-
Bug
-
Resolution: Not an Issue
-
P3
-
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.
"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.
- relates to
-
JDK-8286675 SequenceInputStream::read(b, off, 0) returns -1 at EOF
-
- Closed
-