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

Avoid early initialization of java.nio.Bits

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 11
    • Component/s: core-libs
    • Subcomponent:
    • Resolved In Build:
      b10

      Description

      java.nio.Bits is currently initialized when setting up the System.in/out PrintStreams in System.initPhase1, but it doesn't have to be:

      - Bits.unsafe() can be replaced by direct use of Unsafe.getUnsafe();
      - Bits.byteOrder() can be removed, and the read of platform native ByteOrder moved to... ByteOrder

      This brings a small reduction of class loading during System.initPhase1 (-4 classes)

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              redestad Claes Redestad
              Reporter:
              redestad Claes Redestad
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: