JDK-6924497 : HotSpotDiagnosticsMXBean.getDiagnosticOptions throws NPE
  • Type: Bug
  • Component: core-svc
  • Sub-Component: java.lang.management
  • Affected Version: 6u21,7
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2010-02-09
  • Updated: 2012-10-01
  • Resolved: 2010-02-27
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.
JDK 6 JDK 7
6u19-revFixed 7 b85Fixed
Related Reports
Duplicate :  
Relates :  
Relates :  
Description
A new VM argument type "double" is added by the fix for 6631166 causes a regression to com.sun.management.HotSpotDiagnosticsMXBean API that throws NPE.

The following test failures due to this regression:
  test/com/sun/management/HotSpotDiagnosticMXBean/GetDiagnosticOptions.java
  test/com/sun/management/HotSpotDiagnosticMXBean/SetAllVMOptions.java
  test/javax/management/MBeanServer/OldMBeanServerTest.java
 
java.lang.NullPointerException
	at sun.management.HotSpotDiagnostic.getDiagnosticOptions(HotSpotDiagnostic.java:49)
	at GetDiagnosticOptions.checkDiagnosticOptions(GetDiagnosticOptions.java:57)
	at GetDiagnosticOptions.main(GetDiagnosticOptions.java:47)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:613)
	at com.sun.javatest.regtest.MainWrapper$MainThread.run(MainWrapper.java:94)
	at java.lang.Thread.run(Thread.java:717)

Comments
EVALUATION ChangeSet=http://hg.openjdk.java.net/jdk7/tl/jdk/rev/83c34a6b1458,ChangeRequest=6924497
09-02-2010

EVALUATION The fix to 6898160 filters out unknown types and changes the jmm_GetVMGlobals function whose returning array may contain null elements. JDK side needs to make the corresponding change to check for null elements and handle unsupported types gracefully.
09-02-2010