aboutsummaryrefslogtreecommitdiffstats
path: root/src/test/javassist/JvstTest4.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/javassist/JvstTest4.java')
-rw-r--r--src/test/javassist/JvstTest4.java7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/test/javassist/JvstTest4.java b/src/test/javassist/JvstTest4.java
index 2a60af8b..d84dfbfa 100644
--- a/src/test/javassist/JvstTest4.java
+++ b/src/test/javassist/JvstTest4.java
@@ -1060,7 +1060,7 @@ public class JvstTest4 extends JvstTestRoot {
}
public void testAnnotationLoader() throws Exception {
- CtClass anno = sloader.makeAnnotation("test4.AnnoLoadAnno", null);
+ CtClass anno = sloader.makeAnnotation("test4.AnnoLoadAnno");
anno.debugWriteFile();
CtClass cc = sloader.get("test4.AnnoLoad");
CtMethod m = cc.getDeclaredMethod("foo");
@@ -1073,8 +1073,7 @@ public class JvstTest4 extends JvstTestRoot {
attr.setAnnotation(a);
m.getMethodInfo().addAttribute(attr);
cc.writeFile();
- Object obj = m.getAnnotations()[0];
- String name = obj.getClass().getName();
- assertEquals(anno.getName(), name);
+ Class<?> rc = ((java.lang.annotation.Annotation)m.getAnnotations()[0]).annotationType();
+ assertEquals(anno.getName(), rc.getName());
}
}