RFR: JDK-8295756 Improve NonLocalRegistry Manual Test Process [v4]
Alan Bateman
alanb at openjdk.org
Mon Nov 28 18:38:24 UTC 2022
On Mon, 28 Nov 2022 17:54:51 GMT, Bill Huang <bhuang at 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
More information about the serviceability-dev
mailing list