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

javadoc for ScatteringByteChannel.read(ByteBuffer[]) incorrect

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Duplicate
    • Affects Version/s: 5.0
    • Fix Version/s: None
    • Component/s: core-libs
    • Subcomponent:
    • CPU:
      x86
    • OS:
      windows_xp

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: