-
Bug
-
Resolution: Fixed
-
P3
-
8, 9
-
b127
-
x86
-
linux_ubuntu
-
Verified
FULL PRODUCT VERSION :
A DESCRIPTION OF THE PROBLEM :
When an annotation is put on a member but the annotation type is missing on the class path, the specification requires the runtime to ignore this annotation, i.e. to act as if the annotation is not present.
This works for all annotations but for type annotations where a NullPointerException is thrown from within the code that resolves the type annotation (sun.reflect.annotation.TypeAnnotationParser).
THE PROBLEM WAS REPRODUCIBLE WITH -Xint FLAG: Yes
THE PROBLEM WAS REPRODUCIBLE WITH -server FLAG: Yes
EXPECTED VERSUS ACTUAL BEHAVIOR :
The annotation should simply be suppressed but a NullPointerException is thrown.
ERROR MESSAGES/STACK TRACES THAT OCCUR :
Caused by: java.lang.NullPointerException
at sun.reflect.annotation.TypeAnnotationParser.mapTypeAnnotations(TypeAnnotationParser.java:356)
at sun.reflect.annotation.AnnotatedTypeFactory$AnnotatedTypeBaseImpl.(AnnotatedTypeFactory.java:139)
at sun.reflect.annotation.AnnotatedTypeFactory.buildAnnotatedType(AnnotatedTypeFactory.java:65)
at sun.reflect.annotation.TypeAnnotationParser.buildAnnotatedType(TypeAnnotationParser.java:79)
at java.lang.reflect.Executable.getAnnotatedReturnType0(Executable.java:633)
at java.lang.reflect.Method.getAnnotatedReturnType(Method.java:648)
REPRODUCIBILITY :
This bug can be reproduced always.
A DESCRIPTION OF THE PROBLEM :
When an annotation is put on a member but the annotation type is missing on the class path, the specification requires the runtime to ignore this annotation, i.e. to act as if the annotation is not present.
This works for all annotations but for type annotations where a NullPointerException is thrown from within the code that resolves the type annotation (sun.reflect.annotation.TypeAnnotationParser).
THE PROBLEM WAS REPRODUCIBLE WITH -Xint FLAG: Yes
THE PROBLEM WAS REPRODUCIBLE WITH -server FLAG: Yes
EXPECTED VERSUS ACTUAL BEHAVIOR :
The annotation should simply be suppressed but a NullPointerException is thrown.
ERROR MESSAGES/STACK TRACES THAT OCCUR :
Caused by: java.lang.NullPointerException
at sun.reflect.annotation.TypeAnnotationParser.mapTypeAnnotations(TypeAnnotationParser.java:356)
at sun.reflect.annotation.AnnotatedTypeFactory$AnnotatedTypeBaseImpl.(AnnotatedTypeFactory.java:139)
at sun.reflect.annotation.AnnotatedTypeFactory.buildAnnotatedType(AnnotatedTypeFactory.java:65)
at sun.reflect.annotation.TypeAnnotationParser.buildAnnotatedType(TypeAnnotationParser.java:79)
at java.lang.reflect.Executable.getAnnotatedReturnType0(Executable.java:633)
at java.lang.reflect.Method.getAnnotatedReturnType(Method.java:648)
REPRODUCIBILITY :
This bug can be reproduced always.
- relates to
-
JDK-8146854 Issues with Type annotations on parameters of multiple type variable bound types
-
- Closed
-