RFR: 8201494: Avoid early initialization of java.nio.Bits

Roger Riggs roger.riggs at oracle.com
Thu Apr 12 14:50:43 UTC 2018


Nice cleanup.  +1

Roger


On 4/12/18 10:33 AM, Claes Redestad wrote:
> 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