geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r792822 - in /geronimo/specs/trunk/geronimo-jacc_1.1_spec/src: main/java/javax/security/jacc/HTTPMethodSpec.java test/java/javax/security/jacc/HTTPMethodSpecTest.java
Date Fri, 10 Jul 2009 07:19:06 GMT
Author: djencks
Date: Fri Jul 10 07:19:06 2009
New Revision: 792822

URL: http://svn.apache.org/viewvc?rev=792822&view=rev
Log:
GERONIMO-4734 fix web permissions HTTPMethodSpec equals method

Modified:
    geronimo/specs/trunk/geronimo-jacc_1.1_spec/src/main/java/javax/security/jacc/HTTPMethodSpec.java
    geronimo/specs/trunk/geronimo-jacc_1.1_spec/src/test/java/javax/security/jacc/HTTPMethodSpecTest.java

Modified: geronimo/specs/trunk/geronimo-jacc_1.1_spec/src/main/java/javax/security/jacc/HTTPMethodSpec.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jacc_1.1_spec/src/main/java/javax/security/jacc/HTTPMethodSpec.java?rev=792822&r1=792821&r2=792822&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jacc_1.1_spec/src/main/java/javax/security/jacc/HTTPMethodSpec.java
(original)
+++ geronimo/specs/trunk/geronimo-jacc_1.1_spec/src/main/java/javax/security/jacc/HTTPMethodSpec.java
Fri Jul 10 07:19:06 2009
@@ -223,7 +223,7 @@
 
 
     public boolean equals(HTTPMethodSpec o) {
-        return mask == o.mask && transport == o.transport && Arrays.equals(extensionMethods,
o.extensionMethods);
+        return mask == o.mask && transport == o.transport && isExcluded ==
o.isExcluded && Arrays.equals(extensionMethods, o.extensionMethods);
     }
 
     public String getActions() {
@@ -284,7 +284,7 @@
     }
 
     public int hashCode() {
-        return mask ^ transport;
+        return mask ^ (transport <<8) ^ (isExcluded? 0:0x200);
     }
 
     public String toString() {

Modified: geronimo/specs/trunk/geronimo-jacc_1.1_spec/src/test/java/javax/security/jacc/HTTPMethodSpecTest.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jacc_1.1_spec/src/test/java/javax/security/jacc/HTTPMethodSpecTest.java?rev=792822&r1=792821&r2=792822&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jacc_1.1_spec/src/test/java/javax/security/jacc/HTTPMethodSpecTest.java
(original)
+++ geronimo/specs/trunk/geronimo-jacc_1.1_spec/src/test/java/javax/security/jacc/HTTPMethodSpecTest.java
Fri Jul 10 07:19:06 2009
@@ -44,5 +44,6 @@
         assertEquals("!GET", new HTTPMethodSpec("!GET", parseTransport).getActions());
         assertEquals("!FOO", new HTTPMethodSpec("!FOO", parseTransport).getActions());
         assertEquals("!GET,PUT", new HTTPMethodSpec("!PUT,GET", parseTransport).getActions());
+        assertFalse(new HTTPMethodSpec("GET", parseTransport).equals(new HTTPMethodSpec("!GET",
parseTransport)));
     }
 }



Mime
View raw message