-
Notifications
You must be signed in to change notification settings - Fork 939
InputStream#readAllBytes() should receive no premature EOS #4258
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
I have tried adding the test for it, but don’t know, how to skip its compilation on Java 8. @dagnir , could you add it for me, please, if you know the way?
|
Hey sorry for the delayed response. No worries, I can add a test case. |
Fixed some of the tests since the assertions fail if the read length is 0. This is in line with the default implementation of `read(byte[],int,int)` in `InputStream`: https://github.com/openjdk/jdk11u/blob/d77215acdd6b9008d7f58c7ad5a82d6087c20f86/src/java.base/share/classes/java/io/InputStream.java#L267
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add a change log entry for this?
Kudos, SonarCloud Quality Gate passed! |
@all-contributors please add @faucct for code |
I've put up a pull request to add @faucct! 🎉 |
…c8f9d0ea6 Pull request: release <- staging/0a34fbf5-9db6-403f-82cb-1bcc8f9d0ea6
A read-call with len == 0 happens here:
https://github.com/AdoptOpenJDK/openjdk-jdk11/blob/master/src/java.base/share/classes/java/io/InputStream.java#L396
License