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

Minor typo (wrong word) in JavaDoc for InputStream.read(byte[] b) method

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 7
    • 6u10
    • core-libs
    • b48
    • x86
    • windows_xp

      A DESCRIPTION OF THE PROBLEM :
      In the JavaDoc for the InputStream.read(byte[] b) method, in the "returns" section, the word "is" is used where it should be the word "if":

      This:
      "...or -1 is there is no more data..."
      should be:
      "...or -1 if there is no more data ..."



      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Returns:
          the total number of bytes read into the buffer, or -1 if there is no more data because the end of the stream has been reached.
      ACTUAL -
      Returns:
          the total number of bytes read into the buffer, or -1 is there is no more data because the end of the stream has been reached.

      URL OF FAULTY DOCUMENTATION :
      http://java.sun.com/javase/6/docs/api/java/io/InputStream.html#read(byte[])

            darcy Joe Darcy
            ndcosta Nelson Dcosta (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: