JDK-6618335 : ThreadReference.stop(null) throws NPE instead of InvalidTypeException
  • Type: Bug
  • Component: core-svc
  • Sub-Component: debugger
  • Affected Version: 7,9
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2007-10-17
  • Updated: 2018-02-15
  • Resolved: 2014-11-28
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
8u162Fixed 9 b44Fixed
This causes the following NSK test:


to fail in nightly tests with build 22.  This test passed in b21.

Attaching stand alone reproducer, JDIThreadTest.java, for anyone who does not have access to the sqe test.

SUGGESTED FIX ------- ThreadReferenceImpl.java ------- 168c168 < validateMirror(throwable); --- > validateMirrorOrNull(throwable);

EVALUATION This is caused by the fix for 6456686: VMMismatch not thrown for VM.instanceCounts and VM.redefineClasses That fix added a call to validateMirror on the input argument to ThreadReference.stop(Throwable). validateMirror throws the NPE if the input argument is null. The call should be to validateMirrorOrNull which tolerates the argument being null.