On Tue, 4 Mar 2025 10:50:20 GMT, Daniel Fuchs <dfu...@openjdk.org> wrote:
>> SendaoYan has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Remove unnecessary Exeception > > test/jdk/java/net/InetAddress/IsReachableViaLoopbackTest.java line 43: > >> 41: try { >> 42: InetAddress addr = InetAddress.getLoopbackAddress(); >> 43: InetAddress remoteAddr = >> InetAddress.getByAddress("bugs.openjdk.org".getBytes()); > > You need to pass a real address here - that is, either byte[4] for an IPv4 > address, or byte[16] for an IPv6 address. > For instance - `InetAddress.getByAddress(new byte[] { 104, 77, 118, 65 });`, > or even `InetAddress.getByName("104.77.118.65");` > With that you should be able to remove the `catch (UnknownHostException)` Thanks, "bugs.openjdk.org" has been replaced as real ipv4 address. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/23767#discussion_r1979251298