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

Doug Simon doug.simon at oracle.com
Fri Feb 12 14:10:16 UTC 2016


Looks good to me.

> On 12 Feb 2016, at 14:20, Konstantin Shefov <konstantin.shefov at oracle.com> wrote:
> 
> 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



More information about the hotspot-compiler-dev mailing list