RFR: 8264824: java/net/Inet6Address/B6206527.java doesn't close ServerSocket properly [v2]

Conor Cleary ccleary at openjdk.java.net
Tue Apr 13 10:55:58 UTC 2021


On Tue, 13 Apr 2021 09:04:02 GMT, Michael McMahon <michaelm at openjdk.org> wrote:

>> Conor Cleary has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Removed othervm argument
>
> test/jdk/java/net/Inet6Address/B6206527.java line 47:
> 
>> 45:         }
>> 46: 
>> 47:         try (ServerSocket ss = new ServerSocket()) {
> 
> Maybe for brevity you could use `try (var ss = new ServerSocket()) {`
> 
> Only a suggestion. It's up to you.

Though I agree that the brevity is nice, I think I will leave it as is (`ServerSocket` instead of `var`) in the interest of clarity on the type of instance being created in both test cases as it was the original version of the test.

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

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


More information about the net-dev mailing list