Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4466385

DirectByteBuffer always returns bigEndian with as*Buffer methods

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 1.4.0
    • 1.4.0
    • core-libs
    • beta2
    • x86
    • windows_nt
    • Verified



      Name: bsC130419 Date: 06/05/2001


      java version "1.4.0-beta"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta-b65)
      Java HotSpot(TM) Client VM (build 1.4.0-beta-b65, mixed mode)

        From java.nio.DirectByteBuffer.java: all the as*Buffer() methods return
      a bigEndian buffer even if bigEndian is false.

      the second "ByteBufferAsDoubleBufferB(this)));" should be
      ByteBufferAsDoubleBufferL(this)));


          public DoubleBuffer asDoubleBuffer() {
      if (!unaligned && ((base + position()) % (1 << 3) != 0)) {
      return (bigEndian
      ? (DoubleBuffer)(new ByteBufferAsDoubleBufferB(this))
      : (DoubleBuffer)(new ByteBufferAsDoubleBufferB(this)));
      } else {
      return (nativeByteOrder
      ? (DoubleBuffer)(new DirectDoubleBufferU(this))
      : (DoubleBuffer)(new DirectDoubleBufferS(this)));
      }
          }
      (Review ID: 125874)
      ======================================================================

            mmcclosksunw Michael Mccloskey (Inactive)
            bstrathesunw Bill Strathearn (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: