geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: rev 45940 - geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/jacc
Date Sun, 12 Sep 2004 16:42:29 GMT
Author: adc
Date: Sun Sep 12 09:42:27 2004
New Revision: 45940

Modified:
   geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/jacc/PolicyConfigurationGeneric.java
Log:
Some roles may not have any methods mapped to them.

Modified: geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/jacc/PolicyConfigurationGeneric.java
==============================================================================
--- geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/jacc/PolicyConfigurationGeneric.java
(original)
+++ geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/jacc/PolicyConfigurationGeneric.java
Sun Sep 12 09:42:27 2004
@@ -35,7 +35,7 @@
 
 /**
  *
- * @version $Revision: 1.5 $ $Date: 2004/09/08 12:29:09 $
+ * @version $Revision: 1.5 $ $Date$
  */
 public class PolicyConfigurationGeneric implements GeronimoPolicyConfiguration {
     private final static int OPEN = 1;
@@ -205,7 +205,9 @@
 
             Iterator roles = ((HashSet) principalRoleMapping.get(principal)).iterator();
             while (roles.hasNext()) {
-                Enumeration rolePermissions = ((Permissions) rolePermissionsMap.get(roles.next())).elements();
+                Permissions permissions =  (Permissions) rolePermissionsMap.get(roles.next());
+                if (permissions == null) continue;
+                Enumeration rolePermissions = permissions.elements();
                 while (rolePermissions.hasMoreElements()) {
                     principalPermissions.add((Permission) rolePermissions.nextElement());
                 }

Mime
View raw message