geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r122699 - /geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyWebAppJACCContext.java
Date Sat, 18 Dec 2004 03:54:30 GMT
Author: djencks
Date: Fri Dec 17 19:54:29 2004
New Revision: 122699

URL: http://svn.apache.org/viewcvs?view=rev&rev=122699
Log:
minor simplification
Modified:
   geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyWebAppJACCContext.java

Modified: geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyWebAppJACCContext.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyWebAppJACCContext.java?view=diff&rev=122699&p1=geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyWebAppJACCContext.java&r1=122698&p2=geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyWebAppJACCContext.java&r2=122699
==============================================================================
--- geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyWebAppJACCContext.java
(original)
+++ geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyWebAppJACCContext.java
Fri Dec 17 19:54:29 2004
@@ -31,7 +31,6 @@
 import java.util.Iterator;
 import java.util.Map;
 import java.util.Set;
-import java.util.Enumeration;
 import javax.management.MalformedObjectNameException;
 import javax.management.ObjectName;
 import javax.security.auth.Subject;
@@ -44,16 +43,6 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.mortbay.http.Authenticator;
-import org.mortbay.http.HttpException;
-import org.mortbay.http.HttpRequest;
-import org.mortbay.http.HttpResponse;
-import org.mortbay.http.SecurityConstraint;
-import org.mortbay.http.UserRealm;
-import org.mortbay.jetty.servlet.FormAuthenticator;
-import org.mortbay.jetty.servlet.ServletHolder;
-import org.mortbay.jetty.servlet.ServletHttpRequest;
-
 import org.apache.geronimo.common.GeronimoSecurityException;
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
@@ -75,6 +64,15 @@
 import org.apache.geronimo.transaction.OnlineUserTransaction;
 import org.apache.geronimo.transaction.TrackedConnectionAssociator;
 import org.apache.geronimo.transaction.context.TransactionContextManager;
+import org.mortbay.http.Authenticator;
+import org.mortbay.http.HttpException;
+import org.mortbay.http.HttpRequest;
+import org.mortbay.http.HttpResponse;
+import org.mortbay.http.SecurityConstraint;
+import org.mortbay.http.UserRealm;
+import org.mortbay.jetty.servlet.FormAuthenticator;
+import org.mortbay.jetty.servlet.ServletHolder;
+import org.mortbay.jetty.servlet.ServletHttpRequest;
 
 
 /**
@@ -207,16 +205,13 @@
         contextLength = index;
         chain = securityInterceptor;
 
-        Set p = new HashSet();
+        Set allRolePermissions = new HashSet();
         for (Iterator iterator = rolePermissions.entrySet().iterator(); iterator.hasNext();)
{
             Map.Entry entry = (Map.Entry) iterator.next();
-            Set permissions = (Set) entry.getValue();
-            for (Iterator iterator1 = permissions.iterator(); iterator1.hasNext();) {
-                Permission permission = (Permission) iterator1.next();
-                p.add(permission);
-            }
+            Set permissionsForRole = (Set) entry.getValue();
+            allRolePermissions.addAll(permissionsForRole);
         }
-        for (Iterator iterator = p.iterator(); iterator.hasNext();) {
+        for (Iterator iterator = allRolePermissions.iterator(); iterator.hasNext();) {
             Permission permission = (Permission) iterator.next();
             checked.add(permission);
         }

Mime
View raw message