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

    • Sub-task
    • Status: Closed
    • P4
    • Resolution: Delivered
    • 9
    • 9
    • core-libs
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: