Is this better than the current solution of `nativeOrder() == BIG_ENDIAN` other than reducing a few keystrokes?
On Fri, Jun 25, 2021 at 8:45 AM Yi Yang <yy...@openjdk.java.net> wrote: > > Hi, can I have a review of this change that adds two new utility methods for > java.nio.ByteOrder? Looking through the whole JDK codebase, most calls of > ByteOrder.nativeOrder() is to check if the underlying platform is > little-endian/big-endian. There is no reason to only provide > ByteOrder.nativeOrder while leaving big-endian/little-endian checking methods > blank. > > Thanks! > > ------------- > > Commit messages: > - add new methods > > Changes: https://git.openjdk.java.net/jdk/pull/4595/files > Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=4595&range=00 > Issue: https://bugs.openjdk.java.net/browse/JDK-8269383 > Stats: 20 lines in 1 file changed: 20 ins; 0 del; 0 mod > Patch: https://git.openjdk.java.net/jdk/pull/4595.diff > Fetch: git fetch https://git.openjdk.java.net/jdk pull/4595/head:pull/4595 > > PR: https://git.openjdk.java.net/jdk/pull/4595 > -- - DML • he/him