-
Bug
-
Resolution: Fixed
-
P2
-
7
Test
com/sun/jdi/ListenAddress.java
fails since JDK 7 b102 on Solaris 10 zone with
java.net.SocketException: No such device or address
at java.net.NetworkInterface.getAll(Native Method)
at java.net.NetworkInterface.getNetworkInterfaces(NetworkInterface.java:316)
at ListenAddress.main(ListenAddress.java:93)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:613)
at com.sun.javatest.regtest.MainWrapper$MainThread.run(MainWrapper.java:94)
at java.lang.Thread.run(Thread.java:717)
Other static methods of NetworkInterface that returnes NetworkInterface was also affected.
To reproduce the problem a very simple java code could be used.
import java.net.*;
public class test {
public static void main(String argv[]) {
test t = new test();
t.run();
}
public void run() {
try {
for (int i = 1; i<10; i++) {
if (NetworkInterface.getByIndex(i) != null) {
System.out.println(NetworkInterface.getByIndex(i).getName());
} else {
System.out.println(i);
break;
}
}
} catch (SocketException se) {
se.printStackTrace();
}
}
}
com/sun/jdi/ListenAddress.java
fails since JDK 7 b102 on Solaris 10 zone with
java.net.SocketException: No such device or address
at java.net.NetworkInterface.getAll(Native Method)
at java.net.NetworkInterface.getNetworkInterfaces(NetworkInterface.java:316)
at ListenAddress.main(ListenAddress.java:93)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:613)
at com.sun.javatest.regtest.MainWrapper$MainThread.run(MainWrapper.java:94)
at java.lang.Thread.run(Thread.java:717)
Other static methods of NetworkInterface that returnes NetworkInterface was also affected.
To reproduce the problem a very simple java code could be used.
import java.net.*;
public class test {
public static void main(String argv[]) {
test t = new test();
t.run();
}
public void run() {
try {
for (int i = 1; i<10; i++) {
if (NetworkInterface.getByIndex(i) != null) {
System.out.println(NetworkInterface.getByIndex(i).getName());
} else {
System.out.println(i);
break;
}
}
} catch (SocketException se) {
se.printStackTrace();
}
}
}
- relates to
-
JDK-6931566 NetworkInterface is not working when interface name is more than 15 characters long
-
- Closed
-