geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r481119 - in /geronimo/specs/trunk/geronimo-jacc_1.1_spec: pom.xml src/main/java/javax/security/jacc/HTTPMethodSpec.java src/test/java/javax/security/jacc/WebResourcePermissionTest.java
Date Fri, 01 Dec 2006 00:37:46 GMT
Author: djencks
Date: Thu Nov 30 16:37:43 2006
New Revision: 481119

URL: http://svn.apache.org/viewvc?view=rev&rev=481119
Log:
fix a serialization problem, fix version to 1.0-SNAPSHOT

Modified:
    geronimo/specs/trunk/geronimo-jacc_1.1_spec/pom.xml
    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/WebResourcePermissionTest.java

Modified: geronimo/specs/trunk/geronimo-jacc_1.1_spec/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jacc_1.1_spec/pom.xml?view=diff&rev=481119&r1=481118&r2=481119
==============================================================================
--- geronimo/specs/trunk/geronimo-jacc_1.1_spec/pom.xml (original)
+++ geronimo/specs/trunk/geronimo-jacc_1.1_spec/pom.xml Thu Nov 30 16:37:43 2006
@@ -34,7 +34,7 @@
 
     <artifactId>geronimo-jacc_1.1_spec</artifactId>
     <name>J2EE JACC 1.0</name>
-    <version>1.1-SNAPSHOT</version>
+    <version>1.0-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

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?view=diff&rev=481119&r1=481118&r2=481119
==============================================================================
--- 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
Thu Nov 30 16:37:43 2006
@@ -227,40 +227,44 @@
     }
 
     public String getActions() {
-        if (actions == null && !isAll()) {
-            boolean first = true;
-            StringBuffer buffer = new StringBuffer();
-            if (isExcluded) {
-                buffer.append("!");
-            }
+        if (actions == null) {
+            if (isAll()) {
+                actions = "";
+            } else {
+                boolean first = true;
+                StringBuffer buffer = new StringBuffer();
+                if (isExcluded) {
+                    buffer.append("!");
+                }
 
-            for (int i = 0; i < HTTP_MASKS.length; i++) {
-                if ((mask & HTTP_MASKS[i]) > 0) {
+                for (int i = 0; i < HTTP_MASKS.length; i++) {
+                    if ((mask & HTTP_MASKS[i]) > 0) {
+                        if (first) {
+                            first = false;
+                        } else {
+                            buffer.append(",");
+                        }
+                        buffer.append(HTTP_METHODS[i]);
+                    }
+                }
+                for (int i = 0; i < extensionMethods.length; i++) {
+                    String method = extensionMethods[i];
                     if (first) {
                         first = false;
                     } else {
                         buffer.append(",");
                     }
-                    buffer.append(HTTP_METHODS[i]);
+                    buffer.append(method);
                 }
-            }
-            for (int i = 0; i < extensionMethods.length; i++) {
-                String method = extensionMethods[i];
-                if (first) {
-                    first = false;
-                } else {
-                    buffer.append(",");
+
+                if (transport == INTEGRAL) {
+                    buffer.append(":INTEGRAL");
+                } else if (transport == CONFIDENTIAL) {
+                    buffer.append(":CONFIDENTIAL");
                 }
-                buffer.append(method);
-            }
 
-            if (transport == INTEGRAL) {
-                buffer.append(":INTEGRAL");
-            } else if (transport == CONFIDENTIAL) {
-                buffer.append(":CONFIDENTIAL");
+                actions = buffer.toString();
             }
-
-            actions = buffer.toString();
         }
         return actions;
     }

Modified: geronimo/specs/trunk/geronimo-jacc_1.1_spec/src/test/java/javax/security/jacc/WebResourcePermissionTest.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jacc_1.1_spec/src/test/java/javax/security/jacc/WebResourcePermissionTest.java?view=diff&rev=481119&r1=481118&r2=481119
==============================================================================
--- geronimo/specs/trunk/geronimo-jacc_1.1_spec/src/test/java/javax/security/jacc/WebResourcePermissionTest.java
(original)
+++ geronimo/specs/trunk/geronimo-jacc_1.1_spec/src/test/java/javax/security/jacc/WebResourcePermissionTest.java
Thu Nov 30 16:37:43 2006
@@ -318,7 +318,7 @@
 
     public void testGetActions() {
         WebResourcePermission p = new WebResourcePermission("/foo", "");
-        assertNull(p.getActions());
+        assertEquals(p.getActions(), "");
         p = new WebResourcePermission("/foo", "!GET,POST");
         assertEquals(p.getActions(), "!GET,POST");
         p = new WebResourcePermission("/foo", "!POST,GET");



Mime
View raw message