RFR: 8257736: InputStream from BodyPublishers.ofInputStream() leaks when IOE happens [v3]

Yasumasa Suenaga ysuenaga at openjdk.java.net
Sat Dec 5 04:58:13 UTC 2020


On Fri, 4 Dec 2020 09:59:11 GMT, Daniel Fuchs <dfuchs at openjdk.org> wrote:

>> Yasumasa Suenaga has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Throw UIOE when stream throws IOE
>
> Hi Yasumasa, 
> 
> Thanks for filing the issue and providing a fix. 
> 
> Before integrating, can you please provide a non regression test that verifies the fix? You can place it in `test/jdk/java/net/httpclient/`; 
> Please also make sure that there is no regression in existing tests.
> 
> best regards
> -- daniel

@dfuch Thanks for your comment! I updated PR.

* Close the stream in `StreamIterator::hasNext`
* Throw `UncheckedIOException` whenever IOE happens
* Added testcase for this PR

Could you review again?

-------------

PR: https://git.openjdk.java.net/jdk/pull/1614


More information about the net-dev mailing list