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

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 8
    • Affects Version/s: 8
    • Component/s: 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...

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

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: