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

Regression brought by optimization done with JDK-4926314

XMLWordPrintable

    • b21
    • Verified

      Supposedly after the fix for JDK-4926314 the following code

          new BufferedReader(new CharArrayReader(new char[]{1, 2, 3}))
                                  .read(CharBuffer.allocate(0))

      started to produce '-1' instead of the expected '0'

      Specification for method Reader::read says:

      "Returns: The number of characters added to the buffer, or -1 if this source of characters is at its end"

            bpb Brian Burkhalter
            dbessono Dmitry Bessonov
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: