-
Enhancement
-
Resolution: Fixed
-
P4
-
8
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2221750 | 7u6 | Mike Duigou | P4 | Closed | Fixed | b12 |
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...
static class Holder {
final sun.misc.JavaLangAccess ACCESS = sun.misc.SharedSecrets.getJavaLangAccess();
}
...
if(sun.misc.VM.isBooted() && Holder.ACCESS...
- backported by
-
JDK-2221750 Move sun.misc.VM.booted() to end of System.initializeSystemClass()
-
- Closed
-
- relates to
-
JDK-6888546 restore System.initializeSystemClasses
-
- Closed
-