harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lian...@apache.org
Subject svn commit: r517507 - in /harmony/enhanced/classlib/trunk/modules/luni/src: main/java/java/net/SocketPermission.java test/java/tests/api/java/net/SocketPermissionTest.java
Date Tue, 13 Mar 2007 03:14:58 GMT
Author: liangyx
Date: Mon Mar 12 20:14:58 2007
New Revision: 517507

URL: http://svn.apache.org/viewvc?view=rev&rev=517507
Log:
Apply patch for HARMONY-3333([classlib][luni]java.net.SocketPermission considers port even
if the action is only 'resolve')

Modified:
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/SocketPermission.java
    harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/net/SocketPermissionTest.java

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/SocketPermission.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/SocketPermission.java?view=diff&rev=517507&r1=517506&r2=517507
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/SocketPermission.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/SocketPermission.java
Mon Mar 12 20:14:58 2007
@@ -159,11 +159,13 @@
                 return false;
             }
         }
-        if (this.portMin != sp.portMin) {
-            return false;
-        }
-        if (this.portMax != sp.portMax) {
-            return false;
+        if (this.actionsMask != SP_RESOLVE) {
+            if (this.portMin != sp.portMin) {
+                return false;
+            }
+            if (this.portMax != sp.portMax) {
+                return false;
+            }
         }
         return this.actionsMask == sp.actionsMask;
     }

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/net/SocketPermissionTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/net/SocketPermissionTest.java?view=diff&rev=517507&r1=517506&r2=517507
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/net/SocketPermissionTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/net/SocketPermissionTest.java
Mon Mar 12 20:14:58 2007
@@ -89,6 +89,11 @@
 
         // Regression for HARMONY-1524
         assertFalse(sp1.equals(null));
+        
+        // Regression for HARMONY-3333
+        sp1 = new SocketPermission("TEST1.com:333", "resolve");
+        sp2 = new SocketPermission("test1.com:444", "resolve");
+        assertTrue("Different cases should be equal", sp1.equals(sp2));
 	}
 
 	/**



Mime
View raw message