Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-7149320

Move sun.misc.VM.booted() to end of System.initializeSystemClass()

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 8
    • 8
    • core-libs
    • b115
    • 7
    • b30
    • generic
    • generic
    • Verified

        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...

              mduigou Mike Duigou
              mduigou Mike Duigou
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: