SequenceInputStream::read(b, off, 0) throws NPE at EOF when b is null

XMLWordPrintable

    • Type: Bug
    • Resolution: Not an Issue
    • Priority: P3
    • tbd
    • Affects Version/s: 19
    • Component/s: core-libs
    • b23
    • 19

      As per the recent spec amendments per https://bugs.openjdk.java.net/browse/JDK-8286675
      "NullPointerException if the end of the last contained stream has not been reached and b is null."

      Expectation :
      So this clarifies that When last contained stream has been reached and the b is null shall not throw NPE instead it should return -1.

      Actual Behavior :
      When last contained stream has been reached and the b is null throws NPE, To result in expected behavior there is a need for one more invocation of read() before this.

      For complete context, refer the attached sample with has comments.




            Assignee:
            Brian Burkhalter
            Reporter:
            Krushnareddy Ganapureddy
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: