[9] RFR 8149740: NPEs when executing some HotSpotConstantReflectionProvider with null args

Konstantin Shefov konstantin.shefov at oracle.com
Fri Feb 12 13:20:30 UTC 2016


Hello

Please review a bug fix for 
jdk.vm.ci.hotspot.HotSpotConstantReflectionProvider methods.

A NullPointerException is thrown, when one calls some methods of this 
calss with the argument equal to null.

1) readArrayLength(null);
2) readArrayElement(null, someIndex);
3) boxPrimitive(null);
4) unboxPrimitive(null);

According to javadoc of these methods, NPE should not be thrown in such 
cases.

Additional check should be added for null as the first argument.

Bug: https://bugs.openjdk.java.net/browse/JDK-8149740
Webrev: http://cr.openjdk.java.net/~kshefov/8149740/webrev.00/

Thanks
-Konstantin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20160212/bdc6922b/attachment-0001.html>


More information about the hotspot-compiler-dev mailing list