JDK 9 RFR of JDK-8152174: Type annotations with a missing type throw NullPointerException

joe darcy joe.darcy at oracle.com
Thu Jul 7 05:49:21 UTC 2016


Hello,

Please review the changes to address

     JDK-8152174: Type annotations with a missing type throw 
NullPointerException
     http://cr.openjdk.java.net/~darcy/8152174.0/

In brief, the method TypeAnnotationParser.mapTypeAnnotations is 
analogous to 
sun.reflect.annotation.AnnotationParser.parseAnnotations2(). The latter 
method has a null-check to attempt to add a map entry if the annotation 
null for some reason.

The fix is to add a corresponding null-check in 
TypeAnnotationParser.mapTypeAnnotations.

All previous runtime annotations tests pass with the new code; the new 
tests passes with the new patch and fails without it.

Thanks,

-Joe




More information about the core-libs-dev mailing list