test/java/lang/annotation/TypeAnnotationReflection.java
Print this page
rev 7910 : 8022343: j.l.Class.getAnnotatedSuperclass() doesn't return null in some cases
Reviewed-by: duke
*** 21,31 ****
* questions.
*/
/*
* @test
! * @bug 8004698 8007073
* @summary Unit test for type annotations
*/
import java.util.*;
import java.lang.annotation.*;
--- 21,31 ----
* questions.
*/
/*
* @test
! * @bug 8004698 8007073 8022343
* @summary Unit test for type annotations
*/
import java.util.*;
import java.lang.annotation.*;
*** 56,66 ****
if (!b)
throw new RuntimeException();
}
private static void testSuper() throws Exception {
! check(Object.class.getAnnotatedSuperclass().getAnnotations().length == 0);
check(Class.class.getAnnotatedSuperclass().getAnnotations().length == 0);
AnnotatedType a;
a = TestClassArray.class.getAnnotatedSuperclass();
Annotation[] annos = a.getAnnotations();
--- 56,66 ----
if (!b)
throw new RuntimeException();
}
private static void testSuper() throws Exception {
! check(Object.class.getAnnotatedSuperclass() == null);
check(Class.class.getAnnotatedSuperclass().getAnnotations().length == 0);
AnnotatedType a;
a = TestClassArray.class.getAnnotatedSuperclass();
Annotation[] annos = a.getAnnotations();