8201494: Avoid early initialization of java.nio.Bits

Reviewed-by: rriggs, alanb
This commit is contained in:
Claes Redestad 2018-04-12 17:23:32 +02:00
parent d9440e4e39
commit 9ab38159e8
4 changed files with 12 additions and 17 deletions

View file

@ -1579,7 +1579,7 @@ public abstract class $Type$Buffer
boolean bigEndian // package-private
= true;
boolean nativeByteOrder // package-private
= (Bits.byteOrder() == ByteOrder.BIG_ENDIAN);
= (ByteOrder.nativeOrder() == ByteOrder.BIG_ENDIAN);
/**
* Retrieves this buffer's byte order.
@ -1608,7 +1608,7 @@ public abstract class $Type$Buffer
public final $Type$Buffer order(ByteOrder bo) {
bigEndian = (bo == ByteOrder.BIG_ENDIAN);
nativeByteOrder =
(bigEndian == (Bits.byteOrder() == ByteOrder.BIG_ENDIAN));
(bigEndian == (ByteOrder.nativeOrder() == ByteOrder.BIG_ENDIAN));
return this;
}