Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8080588 VarHandles development
  3. JDK-8154556

Use java.nio.ByteOrder instead of boolean value

    XMLWordPrintable

    Details

      Description

      The ByteBuffer related VarHandle factory method on MethodHandles:

          public static
          VarHandle byteArrayViewVarHandle(Class<?> viewArrayClass,
                                           boolean bigEndian) throws IllegalArgumentException

      accepts a boolean value representing the endianness.

      Changing that parameter to ByteOrder would make it clearer for method invocations what endianness is being requested, and further makes it easier to express native endianness (e.g. ByteOrder.nativeOrder)

        Attachments

          Activity

            People

            Assignee:
            psandoz Paul Sandoz
            Reporter:
            psandoz Paul Sandoz
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: