RFR: 8201494: Avoid early initialization of java.nio.Bits
Claes Redestad
claes.redestad at oracle.com
Thu Apr 12 14:33:53 UTC 2018
Hi,
we initialize a couple of HeapByteBuffer during System.initPhase1 (due
System.out/in), which right now pulls in java.nio.Bits and a few other
dependent classes (AtomicLong...). This can be avoided by removing
Bits.unsafe() and moving the read of native byte order from Bits to
ByteOrder, which all in all seems like a nice cleanup.
Webrev: http://cr.openjdk.java.net/~redestad/8201494/open.00/
Bug: https://bugs.openjdk.java.net/browse/JDK-8201494
Thanks!
/Claes
More information about the nio-dev
mailing list