On Mon, 28 Nov 2022 17:54:51 GMT, Bill Huang <bhu...@openjdk.org> wrote:
>> test/jdk/javax/management/remote/nonLocalAccess/NonLocalJMXRemoteTest.java >> line 167: >> >>> 165: >>> Set.copyOf(Arrays.asList(InetAddress.getAllByName(myHostName))); >>> 166: Set<InetAddress> hostAddrs = >>> 167: >>> Set.copyOf(Arrays.asList(InetAddress.getAllByName(host))); >> >> Is there a reason to change this from Set.of? > > This is a workaround for duplicate elements detected by Set.of(). On my > localhost, InetAddress.getAllByName(localhost returns duplicate IPv6 > addresses with different scoped id which is not counted during comparison. > This change shouldn't impact the goal of these tests which is to verify that > registry modification request from client side is prohibited. Thanks. You might want to add a comment to avoid drive-by suggestions to simplify it. ------------- PR: https://git.openjdk.org/jdk/pull/10825