-
Bug
-
Resolution: Duplicate
-
P3
-
None
-
7u161
InetAddress isReachable fails with jdk7u but passes with jdk8u.
Sample Program:
import java.net.InetAddress;
public class Test {
public static void main(String[] args) {
try {
final InetAddress addr = InetAddress.getByName("hostname");
final boolean isReachable = addr.isReachable(2000);
if (!isReachable) {
System.out.println("Not Reachable");
} else {
System.out.println("Reachable");
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
Excepted: Reachable
Actual: Not Reachable
Sample Program:
import java.net.InetAddress;
public class Test {
public static void main(String[] args) {
try {
final InetAddress addr = InetAddress.getByName("hostname");
final boolean isReachable = addr.isReachable(2000);
if (!isReachable) {
System.out.println("Not Reachable");
} else {
System.out.println("Reachable");
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
Excepted: Reachable
Actual: Not Reachable
- duplicates
-
JDK-8159410 InetAddress.isReachable returns true for non existing IP addresses
- Closed
- relates to
-
JDK-8166747 Add invalid network / computer name cases to isReachable known failure switch
- Resolved
-
JDK-8133015 InetAddress.isReachable(tmout) returning wrong value on Windows for IPv6
- Closed
-
JDK-8143397 It looks like InetAddress.isReachable(timeout) works incorrectly
- Closed
-
JDK-8159410 InetAddress.isReachable returns true for non existing IP addresses
- Closed