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

Avoid early initialization of java.nio.Bits

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 11
    • None
    • core-libs
    • b10

      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)

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

              Created:
              Updated:
              Resolved: