RFR: JDK-8273142 : Remove dependancy of TestHttpServer, HttpTransaction, HttpCallback from open/test/jdk/sun/net/www/protocol/http/ tests [v2]

Michael McMahon michaelm at openjdk.java.net
Thu Sep 30 10:52:34 UTC 2021


On Thu, 30 Sep 2021 09:05:41 GMT, Daniel Fuchs <dfuchs at openjdk.org> wrote:

>> I think it would be simpler to replace lines 101-103 just with `trans.close()`
>
> Strictly speaking to preserve the current behavior - that would be `trans.getResponseBody().close();` isn't it?

HttpExchange.close() calls the close method on both streams and closing the output stream implicitly closes the input stream. So, they are equivalent.

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

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


More information about the net-dev mailing list