Skip to content


Browse files Browse the repository at this point in the history
8267544: (test) rmi test NonLocalSkeleton fails if network has multip…
…le adapters with the same address

Reviewed-by: dfuchs
  • Loading branch information
Roger Riggs committed May 24, 2021
1 parent f453166 commit d8e6e28
Showing 1 changed file with 3 additions and 2 deletions.
Expand Up @@ -37,6 +37,7 @@
import java.rmi.server.RemoteObjectInvocationHandler;
import java.util.Arrays;
import java.util.Set;

Expand Down Expand Up @@ -85,8 +86,8 @@ public static void main(String[] args) throws Exception {

// Check if running the test on a local system; it only applies to remote
String myHostName = InetAddress.getLocalHost().getHostName();
Set<InetAddress> myAddrs = Set.of(InetAddress.getAllByName(myHostName));
Set<InetAddress> hostAddrs = Set.of(InetAddress.getAllByName(host));
Set<InetAddress> myAddrs = Set.copyOf(Arrays.asList(InetAddress.getAllByName(myHostName)));
Set<InetAddress> hostAddrs = Set.copyOf(Arrays.asList(InetAddress.getAllByName(host)));
boolean isLocal = ( -> myAddrs.contains(i))
|| -> h.isLoopbackAddress()));

Expand Down

1 comment on commit d8e6e28

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.