On Fri, 21 May 2021 17:00:11 GMT, Mark Sheppard <mshep...@openjdk.org> wrote:
>> test/jdk/java/net/Socket/UdpSocket.java line 151: >> >>> 149: } >>> 150: } >>> 151: return newUdpSocket; >> >> I added this test in advance of JEP 353 as we didn't have much coverage for >> this deprecated constructor. No objection to the retry if it helps. Is the >> catching of SocketException a left over from testing? I assume the patch can >> be simplified down to: >> >> >> try { >> return new Socket(InetAddress.getLoopbackAddress(), 8000, false); >> } catch (BindException e) { >> System.out.println(...); >> return new Socket(InetAddress.getLoopbackAddress(), 8000, false); >> } > > yes, thanks for that ... updated as requested Thanks, and if you want to keep it consistent with the existing code then you could rename "Socket newUdpSocket" and "biEx", or just change it to "return new Socket(...)". ------------- PR: https://git.openjdk.java.net/jdk/pull/4103