RFR(S): 6618335: ThreadReference.stop(null) throws NPE instead of InvalidTypeException

Erik Gahlin erik.gahlin at oracle.com
Thu Nov 27 22:37:49 UTC 2014


Hi,

Could I have a review of a small fix to the JDI implementation.

If ThreadReference#stop(null) is called, a NPE is triggered before the 
code that should throw an InvalidTypeException is reached. Fix is to use 
validateMirrorOrNull, which ignores the vaildation if it's null.

This is similar to how ThreadReference#forceEarlyReturn is implemented. 
Tested with jdk_jdi.

Thanks
Erik

Bug:
https://bugs.openjdk.java.net/browse/JDK-6618335

Webrev:
http://cr.openjdk.java.net/~egahlin/6618335/


More information about the serviceability-dev mailing list