Testsuite name: regression
Test: com/sun/management/HotSpotDiagnosticMXBean/GetDiagnosticOptions.java fails on 6u20b01, but passed on 6u19b03, 6u19b04, 6 fcs b105.
JDK/JRE tested: jdk 6u20b01
OS/architecture: x86-ubuntu, sun4u-solaris10
Reproducible: Always
Reproducible on machine: stt-89.russia, stt-64.russia, withblade.russia, spellweaver
Is it a platform specific regression: N
Is it a Regression: Y
[If yes] Regression introduced in release/build: 6u20b01
Test result on FCS: Passed, Passed on 6u19b03, 6u19b04
Steps to reproduce:
ik217385@ik217385-desktop:/export/jqa/regression/6u20b01$ /export/jdk/6u20b01/jdk1.6.0_20/bin/javac GetDiagnosticOptions.java
GetDiagnosticOptions.java:22: warning: sun.management.ManagementFactory is Sun proprietary API and may be removed in a future release
sun.management.ManagementFactory.getDiagnosticMXBean();
^
1 warning
ik217385@ik217385-desktop:/export/jqa/regression/6u20b01$ /export/jdk/6u20b01/jdk1.6.0_20/bin/java GetDiagnosticOptions
Exception in thread "main" java.lang.NullPointerException
at sun.management.HotSpotDiagnostic.getDiagnosticOptions(HotSpotDiagnostic.java:29)
at GetDiagnosticOptions.checkDiagnosticOptions(GetDiagnosticOptions.java:33)
at GetDiagnosticOptions.main(GetDiagnosticOptions.java:23)
/java/re/jdk/6u20/promoted/ea/b01/j4b/ws/j2se/src/share/classes/sun/management/HotSpotDiagnostic.java
eugene@eugened:~> head -35 /java/re/jdk/6u20/promoted/ea/b01/j4b/ws/j2se/src/share/classes/sun/management/HotSpotDiagnostic.java | tail -10
List<Flag> allFlags = Flag.getAllFlags();
List<VMOption> result = new ArrayList<VMOption>();
for (Flag flag : allFlags) {
if (flag.isWriteable() && flag.isExternal()) {
result.add(flag.getVMOption());
}
}
return result;
}
It seems that some flag is Null, and NPE at string "if (flag.isWriteable() && flag.isExternal()) "