On Wed, 29 Sep 2021 13:45:43 GMT, Mahendra Chhipa 
<github.com+34924738+mahendrachh...@openjdk.org> wrote:

>> test/jdk/sun/net/www/protocol/http/B6296310.java line 103:
>> 
>>> 101:          try(PrintWriter pw = new 
>>> PrintWriter(trans.getResponseBody())) {
>>> 102:             pw.print("");
>>> 103:          }
>> 
>> Not sure what the purpose of this block is, which apparently writes no bytes 
>> to the OutputStream?
>
> Hi @Michael-Mc-Mahon , In my understanding purpose of this block is to return 
> a file with no contents.(Empty file).

I think it would be simpler to replace lines 101-103 just with `trans.close()`

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

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

Reply via email to