-
Bug
-
Resolution: Fixed
-
P4
-
1.4.2, 1.4.2_06
-
tiger
-
x86
-
windows_2000, windows_2003
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2190697 | 1.4-pool | Abhijit Saha | P3 | Closed | Won't Fix |
InetAddress.getByName("0") returns "0/0.0.0.0" as expected on Solaris and Linux. However on Windows, a java.net.UnknownHostException is thrown. I've tried Win2000 Pro, Win2003 SE, and WinXP Pro. All with the same result.
Here's the test
---------------
import java.net.InetAddress;
public class test1 {
public static void main(String argv[]){
try {
System.out.println( InetAddress.getByName("0") );
} catch(java.net.UnknownHostException e) {
e.printStackTrace();
}
return;
}
}
Output from Windows
-------------------
java.net.UnknownHostException: 0: 0
at java.net.InetAddress.getAllByName0(Unknown Source)
at java.net.InetAddress.getAllByName0(Unknown Source)
at java.net.InetAddress.getAllByName(Unknown Source)
at java.net.InetAddress.getByName(Unknown Source)
at test1.main(test1.java:7)
Here's the test
---------------
import java.net.InetAddress;
public class test1 {
public static void main(String argv[]){
try {
System.out.println( InetAddress.getByName("0") );
} catch(java.net.UnknownHostException e) {
e.printStackTrace();
}
return;
}
}
Output from Windows
-------------------
java.net.UnknownHostException: 0: 0
at java.net.InetAddress.getAllByName0(Unknown Source)
at java.net.InetAddress.getAllByName0(Unknown Source)
at java.net.InetAddress.getAllByName(Unknown Source)
at java.net.InetAddress.getByName(Unknown Source)
at test1.main(test1.java:7)
- backported by
-
JDK-2190697 InetAddress.getByName behaves differently on Windows
-
- Closed
-
- duplicates
-
JDK-5072258 AddressTypes network test fails for windows since 142_fcs
-
- Closed
-