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

java.io.InputStreamReader.read(char[], -int, -int) is allowed

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • 1.1.5
    • core-libs
    • None
    • generic
    • generic

      If you call InputStreamReader.read(char[], int, int) with negative values in the offset and length parameters, no exception is raised. The read is performed. In my test, which used a 3 character array, the call was:

      isr.read(array, -5, -10) and the resulting array was unchanged.

            zlisunw Zhenghua Li (Inactive)
            kdonkersunw Karin Donker (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: