-
Bug
-
Resolution: Unresolved
-
P4
-
11, 17, 21, 22
-
Fix Understood
-
generic
-
linux
The test uses this code to create a list of valid adresses for the localhost:
String hostname = "localhost";
List<String> validAddresses = new LinkedList<>();
validAddresses.add(hostname);
Arrays.stream(InetAddress.getAllByName(hostname))
.forEach(address -> validAddresses.add(address.getHostAddress()));
It does not work properly if the custom name is set for the 127.0.01 via /etc/hosts file. In that case the correct address will be "SomeCustomName:port".
Additionally to the "localhost", the test should validate the name returned by the InetAddress.getLocalHost().getHostName().
String hostname = "localhost";
List<String> validAddresses = new LinkedList<>();
validAddresses.add(hostname);
Arrays.stream(InetAddress.getAllByName(hostname))
.forEach(address -> validAddresses.add(address.getHostAddress()));
It does not work properly if the custom name is set for the 127.0.01 via /etc/hosts file. In that case the correct address will be "SomeCustomName:port".
Additionally to the "localhost", the test should validate the name returned by the InetAddress.getLocalHost().getHostName().
- links to
-
Review openjdk/jdk/15203