Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8143394 PushbackReader throws NullPointerException
  3. JDK-8175508

Release Note: CharArrayReader, PushbackReader, and StringReader may now block in close()

    XMLWordPrintable

    Details

    • Type: Sub-task
    • Status: Closed
    • Priority: P4
    • Resolution: Delivered
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: core-libs
    • Subcomponent:
    • Verification:
      Verified

      Description

      The `java.io` classes `CharArrayReader`, `PushbackReader`, and `StringReader` might now block in `close()` if there is another thread holding the `Reader.lock` lock.

      The `read()` method of these classes could previously throw a `NullPointerException` if the internal state of the instance had become inconsistent. This was caused by a race condition due to `close()` not obtaining a lock before modifying the internal state of the `Reader`. This lock is now obtained which can result in `close()` blocking if another thread simultaneously holds the same lock on the `Reader`.

        Attachments

          Activity

            People

            Assignee:
            bpb Brian Burkhalter
            Reporter:
            bpb Brian Burkhalter
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: