javadoc for ScatteringByteChannel.read(ByteBuffer[]) incorrect

XMLWordPrintable

    • Type: Bug
    • Resolution: Duplicate
    • Priority: P4
    • None
    • Affects Version/s: 5.0
    • Component/s: core-libs
    • x86
    • windows_xp

      FULL PRODUCT VERSION :


      A DESCRIPTION OF THE PROBLEM :
      Invalid javadoc for ScatteringByteChannel.read(ByteBuffer[])

       An invocation of this method of the form c.read(dsts) behaves in exactly the same manner as the invocation

           c.read(dsts, 0, srcs.length);

      should be:
           c.read(dsts, 0, dsts.length);

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      look at:
      http://java.sun.com/j2se/1.5.0/docs/api/java/nio/channels/ScatteringByteChannel.html#read(java.nio.ByteBuffer[])
      http://java.sun.com/j2se/1.5.0/docs/api/java/nio/channels/SocketChannel.html#read(java.nio.ByteBuffer[])
      http://java.sun.com/j2se/1.4.2/docs/api/java/nio/channels/ScatteringByteChannel.html#read(java.nio.ByteBuffer[])
      http://java.sun.com/j2se/1.4.2/docs/api/java/nio/channels/SocketChannel.html#read(java.nio.ByteBuffer[])

      notice it says:

       An invocation of this method of the form c.read(dsts) behaves in exactly the same manner as the invocation

           c.read(dsts, 0, srcs.length);

      srcs.length is not defined. The code indicates that it should be c.read(dests, 0, dests.length);

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      An invocation of this method of the form c.read(dsts) behaves in exactly the same manner as the invocation

           c.read(dsts, 0, dsts.length);
      ACTUAL -
       An invocation of this method of the form c.read(dsts) behaves in exactly the same manner as the invocation

           c.read(dsts, 0, srcs.length);

      REPRODUCIBILITY :
      This bug can be reproduced always.

            Assignee:
            Unassigned
            Reporter:
            Ranjith Mandala (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: