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

java.io.InputStream.read(byte[], int, int) does not check for null

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 1.2.0
    • core-libs
    • generic
    • generic



      Name: rm29839 Date: 02/27/98


      This is a code from this method:
      ...
      if (len <= 0) { return 0; }
      int c = read();
      if (c == -1) { return -1;}
      b[off] = (byte)c;
      ...
      You don't check if b equals to null at this point. But according to your javadoc to this method shoudl to do it.

      -regards.
      (Review ID: 25753)
      ======================================================================

            bgomessunw Benedict Gomes (Inactive)
            rmandelsunw Ronan Mandel (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: