JDK-7149320 : Move sun.misc.VM.booted() to end of System.initializeSystemClass()
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.lang
  • Affected Version: 8
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2012-02-28
  • Updated: 2012-05-07
  • Resolved: 2012-05-07
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 7 JDK 8
7u6Fixed 8 b30Fixed
Related Reports
Relates :  
Description
sun.misc.VM.booted() is currently called before setJavaLangAccess. For code which uses the JavaLangAccess shared secrets it's convenient to be able to check whether the secrets are initialized. In particluar with the static inner class holder idiom:

static class Holder {
  final sun.misc.JavaLangAccess ACCESS = sun.misc.SharedSecrets.getJavaLangAccess();
}

...

if(sun.misc.VM.isBooted() && Holder.ACCESS...

Comments
SUGGESTED FIX http://hg.openjdk.java.net/jdk8/tl-gate/jdk/rev/971a86421f51
01-03-2012

SUGGESTED FIX http://cr.openjdk.java.net/~mduigou/7149320/0/webrev/
01-03-2012

EVALUATION move sun.misc.VM.booted() to the very end of the method.
28-02-2012