6961029: java/net/BindException/Test.java should not use wildcard address
authorchegar
Mon, 28 Jun 2010 20:52:37 +0100
changeset 5981 2d5303114f44
parent 5980 38a40caa84fc
child 5982 de622fe4f7d8
child 6864 192093b11c67
6961029: java/net/BindException/Test.java should not use wildcard address Reviewed-by: michaelm, alanb
jdk/test/ProblemList.txt
jdk/test/java/net/BindException/Test.java
jdk/test/java/net/ipv6tests/Tests.java
--- a/jdk/test/ProblemList.txt	Mon Jun 28 15:06:24 2010 +0100
+++ b/jdk/test/ProblemList.txt	Mon Jun 28 20:52:37 2010 +0100
@@ -379,9 +379,6 @@
 #   Interrupted or IO exception, maybe writing to non-unique named file?
 com/sun/net/httpserver/bugs/B6373555.java			generic-all
 
-# Fails on OpenSolaris, BindException unexpected 
-java/net/BindException/Test.java				generic-all
-
 # Fails on OpenSolaris, times out
 java/net/MulticastSocket/SetOutgoingIf.java			generic-all
 
--- a/jdk/test/java/net/BindException/Test.java	Mon Jun 28 15:06:24 2010 +0100
+++ b/jdk/test/java/net/BindException/Test.java	Mon Jun 28 20:52:37 2010 +0100
@@ -180,7 +180,7 @@
             while (addrs.hasMoreElements()) {
                 InetAddress ia = (InetAddress)addrs.nextElement();
 
-                if (ia.isLoopbackAddress()) {
+                if (ia.isLoopbackAddress() || ia.isAnyLocalAddress()) {
                     continue;
                 }
 
--- a/jdk/test/java/net/ipv6tests/Tests.java	Mon Jun 28 15:06:24 2010 +0100
+++ b/jdk/test/java/net/ipv6tests/Tests.java	Mon Jun 28 20:52:37 2010 +0100
@@ -248,7 +248,8 @@
                 }
                 while (addrs.hasMoreElements()) {
                     InetAddress addr = (InetAddress) addrs.nextElement();
-                    if (filter.isInstance (addr) && !addr.isLoopbackAddress()) {
+                    if (filter.isInstance (addr) && !addr.isLoopbackAddress()
+                            && !addr.isAnyLocalAddress()) {
                         if (Arrays.equals (addr.getAddress(), fe80_loopback)) {
                             continue;
                         }