On Wed, 27 Mar 2024 16:35:35 GMT, Darragh Clarke <[email protected]> wrote:
>> test/jdk/com/sun/net/httpserver/bugs/B6431193.java line 81: >> >>> 79: .toURL(); >>> 80: InputStream is = >>> url.openConnection(Proxy.NO_PROXY).getInputStream(); >>> 81: read(is); >> >> should use try-with-resource here too. `read(is)` no longer closes `is`. > > Good point, looking at it again would it be worthwhile to get rid of the > `read` method and just use `is.readAllBytes` in it's place? Depends on how much data the test actually sends. If it's a small amount readAllBytes is fine. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/18514#discussion_r1541925035
