On Fri, 11 Jun 2021 10:58:42 GMT, Daniel Fuchs <dfu...@openjdk.org> wrote:
>> Ivan Šipka has updated the pull request incrementally with one additional >> commit since the last revision: >> >> 8263364: refactor > > test/jdk/sun/net/www/http/KeepAliveStream/KeepAliveStreamCloseWithWrongContentLength.java > line 56: > >> 54: >> 55: ByteArrayOutputStream clientBytes; >> 56: Socket socket = null; > > socket should probably be a volatile field in XServer si that it can be > closed at the end of main() it closes it any case but since the RW operations and close operations are in different threads, I have added the volatile keywords. > test/jdk/sun/net/www/http/KeepAliveStream/KeepAliveStreamCloseWithWrongContentLength.java > line 139: > >> 137: is.close(); >> 138: } catch (IOException e) { >> 139: throw new RuntimeException (e); > > No need to catch and wrap since main is declared to throw Exception. Just let > IOException and NullPointerException percolate out of main... percolate <3 ------------- PR: https://git.openjdk.java.net/jdk/pull/4472