-
Notifications
You must be signed in to change notification settings - Fork 853
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
InputStream#readAllBytes() should receive no premature EOS (#4258)
* InputStream#readAllBytes() should receive no premature EOS 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 * Add/Fix tests 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 * Add changelog entry --------- Co-authored-by: Dongie Agnir <dongie@amazon.com> Co-authored-by: Dongie Agnir <261310+dagnir@users.noreply.github.com>
- Loading branch information
1 parent
38075ec
commit 3abf1c3
Showing
3 changed files
with
23 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"type": "bugfix", | ||
"category": "AWS SDK for Java v2", | ||
"contributor": "faucct", | ||
"description": "Fix `InputStreamSubscriber` to return 0 when reading a length of 0." | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters