RFR: 8326568: jdk/test/com/sun/net/httpserver/bugs/B6431193.java should use try-with-resource and try-finally [v2]
Darragh Clarke
dclarke at openjdk.org
Tue Apr 2 13:59:09 UTC 2024
On Tue, 2 Apr 2024 13:25:54 GMT, Daniel Fuchs <dfuchs at openjdk.org> wrote:
>> test/jdk/com/sun/net/httpserver/bugs/B6431193.java line 60:
>>
>>> 58: t.sendResponseHeaders(200, response.length());
>>> 59: os.write(response.getBytes());
>>> 60: os.close();
>>
>> no need to call `os.close()` here since it will be called by the `try ( ) { }` block.
>
> line with `os.close()` should be removed
Sorry for missing that one on the last PR, removing it now
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18514#discussion_r1547944596
More information about the net-dev
mailing list