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

Daniel Fuchs dfuchs at openjdk.java.net
Thu Dec 10 10:16:40 UTC 2020


On Thu, 10 Dec 2020 09:35:05 GMT, Chris Hegarty <chegar 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
>
> test/jdk/java/net/httpclient/StreamCloseTest.java line 37:
> 
>> 35:  * @compile ../../../com/sun/net/httpserver/FileServerHandler.java
>> 36:  * @build jdk.test.lib.net.SimpleSSLContext
>> 37:  * @build LightWeightHttpServer
> 
> It would be preferable to avoid the use of LightWeightHttpServer in this test. The server-side seems trivial enough to implement locally in the test.

I agree with Chris. In addition it will make it possible to check that the server either doesn't receive the request, or get an exception when it tries to read the body bytes.

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

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


More information about the net-dev mailing list