geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jboy...@apache.org
Subject cvs commit: incubator-geronimo/modules/system/src/java/org/apache/geronimo/system/logging/log4j/appender ConsoleAppenderService.java
Date Tue, 22 Jun 2004 02:07:37 GMT
jboynes     2004/06/21 19:07:37

  Modified:    modules/security/src/java/org/apache/geronimo/security/jacc
                        PolicyConfigurationEJB.java
                        PolicyConfigurationGeneric.java
                        PolicyConfigurationWeb.java
               modules/security/src/java/org/apache/geronimo/security/realm/providers
                        PropertiesFileLoginModule.java
                        PropertiesFileSecurityRealm.java
               modules/system/src/java/org/apache/geronimo/system/logging/log4j/appender
                        ConsoleAppenderService.java
  Log:
  enum is a reserved word in 1.5
  
  Revision  Changes    Path
  1.4       +10 -12    incubator-geronimo/modules/security/src/java/org/apache/geronimo/security/jacc/PolicyConfigurationEJB.java
  
  Index: PolicyConfigurationEJB.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/security/src/java/org/apache/geronimo/security/jacc/PolicyConfigurationEJB.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- PolicyConfigurationEJB.java	10 Mar 2004 09:59:25 -0000	1.3
  +++ PolicyConfigurationEJB.java	22 Jun 2004 02:07:37 -0000	1.4
  @@ -29,10 +29,8 @@
   import java.util.HashMap;
   import java.util.HashSet;
   import java.util.Iterator;
  -
   import javax.security.jacc.PolicyContextException;
   
  -import org.apache.geronimo.security.jacc.GeronimoPolicyConfiguration;
   import org.apache.geronimo.security.RealmPrincipal;
   
   
  @@ -106,9 +104,9 @@
       public void addToRole(String roleName, PermissionCollection permissions) throws PolicyContextException
{
           if (state != OPEN) throw new UnsupportedOperationException("Not in an open state");
   
  -        Enumeration enum = permissions.elements();
  -        while (enum.hasMoreElements()) {
  -            addToRole(roleName, (Permission) enum.nextElement());
  +        Enumeration e = permissions.elements();
  +        while (e.hasMoreElements()) {
  +            addToRole(roleName, (Permission) e.nextElement());
           }
       }
   
  @@ -126,9 +124,9 @@
       public void addToUncheckedPolicy(PermissionCollection permissions) throws PolicyContextException
{
           if (state != OPEN) throw new UnsupportedOperationException("Not in an open state");
   
  -        Enumeration enum = permissions.elements();
  -        while (enum.hasMoreElements()) {
  -            addToUncheckedPolicy((Permission) enum.nextElement());
  +        Enumeration e = permissions.elements();
  +        while (e.hasMoreElements()) {
  +            addToUncheckedPolicy((Permission) e.nextElement());
           }
       }
   
  @@ -143,9 +141,9 @@
       public void addToExcludedPolicy(PermissionCollection permissions) throws PolicyContextException
{
           if (state != OPEN) throw new UnsupportedOperationException("Not in an open state");
   
  -        Enumeration enum = permissions.elements();
  -        while (enum.hasMoreElements()) {
  -            addToUncheckedPolicy((Permission) enum.nextElement());
  +        Enumeration e = permissions.elements();
  +        while (e.hasMoreElements()) {
  +            addToUncheckedPolicy((Permission) e.nextElement());
           }
       }
   
  
  
  
  1.4       +10 -12    incubator-geronimo/modules/security/src/java/org/apache/geronimo/security/jacc/PolicyConfigurationGeneric.java
  
  Index: PolicyConfigurationGeneric.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/security/src/java/org/apache/geronimo/security/jacc/PolicyConfigurationGeneric.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- PolicyConfigurationGeneric.java	10 Mar 2004 09:59:25 -0000	1.3
  +++ PolicyConfigurationGeneric.java	22 Jun 2004 02:07:37 -0000	1.4
  @@ -28,10 +28,8 @@
   import java.util.HashMap;
   import java.util.HashSet;
   import java.util.Iterator;
  -
   import javax.security.jacc.PolicyContextException;
   
  -import org.apache.geronimo.security.jacc.GeronimoPolicyConfiguration;
   import org.apache.geronimo.security.RealmPrincipal;
   
   
  @@ -102,9 +100,9 @@
       public void addToRole(String roleName, PermissionCollection permissions) throws PolicyContextException
{
           if (state != OPEN) throw new UnsupportedOperationException("Not in an open state");
   
  -        Enumeration enum = permissions.elements();
  -        while (enum.hasMoreElements()) {
  -            addToRole(roleName, (Permission) enum.nextElement());
  +        Enumeration e = permissions.elements();
  +        while (e.hasMoreElements()) {
  +            addToRole(roleName, (Permission) e.nextElement());
           }
       }
   
  @@ -122,9 +120,9 @@
       public void addToUncheckedPolicy(PermissionCollection permissions) throws PolicyContextException
{
           if (state != OPEN) throw new UnsupportedOperationException("Not in an open state");
   
  -        Enumeration enum = permissions.elements();
  -        while (enum.hasMoreElements()) {
  -            addToUncheckedPolicy((Permission) enum.nextElement());
  +        Enumeration e = permissions.elements();
  +        while (e.hasMoreElements()) {
  +            addToUncheckedPolicy((Permission) e.nextElement());
           }
       }
   
  @@ -139,9 +137,9 @@
       public void addToExcludedPolicy(PermissionCollection permissions) throws PolicyContextException
{
           if (state != OPEN) throw new UnsupportedOperationException("Not in an open state");
   
  -        Enumeration enum = permissions.elements();
  -        while (enum.hasMoreElements()) {
  -            addToUncheckedPolicy((Permission) enum.nextElement());
  +        Enumeration e = permissions.elements();
  +        while (e.hasMoreElements()) {
  +            addToUncheckedPolicy((Permission) e.nextElement());
           }
       }
   
  
  
  
  1.4       +10 -12    incubator-geronimo/modules/security/src/java/org/apache/geronimo/security/jacc/PolicyConfigurationWeb.java
  
  Index: PolicyConfigurationWeb.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/security/src/java/org/apache/geronimo/security/jacc/PolicyConfigurationWeb.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- PolicyConfigurationWeb.java	10 Mar 2004 09:59:25 -0000	1.3
  +++ PolicyConfigurationWeb.java	22 Jun 2004 02:07:37 -0000	1.4
  @@ -28,10 +28,8 @@
   import java.util.HashMap;
   import java.util.HashSet;
   import java.util.Iterator;
  -
   import javax.security.jacc.PolicyContextException;
   
  -import org.apache.geronimo.security.jacc.GeronimoPolicyConfiguration;
   import org.apache.geronimo.security.RealmPrincipal;
   
   
  @@ -102,9 +100,9 @@
       public void addToRole(String roleName, PermissionCollection permissions) throws PolicyContextException
{
           if (state != OPEN) throw new UnsupportedOperationException("Not in an open state");
   
  -        Enumeration enum = permissions.elements();
  -        while (enum.hasMoreElements()) {
  -            addToRole(roleName, (Permission) enum.nextElement());
  +        Enumeration e = permissions.elements();
  +        while (e.hasMoreElements()) {
  +            addToRole(roleName, (Permission) e.nextElement());
           }
       }
   
  @@ -122,9 +120,9 @@
       public void addToUncheckedPolicy(PermissionCollection permissions) throws PolicyContextException
{
           if (state != OPEN) throw new UnsupportedOperationException("Not in an open state");
   
  -        Enumeration enum = permissions.elements();
  -        while (enum.hasMoreElements()) {
  -            addToUncheckedPolicy((Permission) enum.nextElement());
  +        Enumeration e = permissions.elements();
  +        while (e.hasMoreElements()) {
  +            addToUncheckedPolicy((Permission) e.nextElement());
           }
       }
   
  @@ -139,9 +137,9 @@
       public void addToExcludedPolicy(PermissionCollection permissions) throws PolicyContextException
{
           if (state != OPEN) throw new UnsupportedOperationException("Not in an open state");
   
  -        Enumeration enum = permissions.elements();
  -        while (enum.hasMoreElements()) {
  -            addToUncheckedPolicy((Permission) enum.nextElement());
  +        Enumeration e = permissions.elements();
  +        while (e.hasMoreElements()) {
  +            addToUncheckedPolicy((Permission) e.nextElement());
           }
       }
   
  
  
  
  1.5       +9 -10     incubator-geronimo/modules/security/src/java/org/apache/geronimo/security/realm/providers/PropertiesFileLoginModule.java
  
  Index: PropertiesFileLoginModule.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/security/src/java/org/apache/geronimo/security/realm/providers/PropertiesFileLoginModule.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- PropertiesFileLoginModule.java	10 Mar 2004 09:59:26 -0000	1.4
  +++ PropertiesFileLoginModule.java	22 Jun 2004 02:07:37 -0000	1.5
  @@ -17,6 +17,11 @@
   
   package org.apache.geronimo.security.realm.providers;
   
  +import java.io.IOException;
  +import java.util.Enumeration;
  +import java.util.Iterator;
  +import java.util.Map;
  +import java.util.Set;
   import javax.security.auth.Subject;
   import javax.security.auth.callback.Callback;
   import javax.security.auth.callback.CallbackHandler;
  @@ -26,12 +31,6 @@
   import javax.security.auth.login.LoginException;
   import javax.security.auth.spi.LoginModule;
   
  -import java.io.IOException;
  -import java.util.Enumeration;
  -import java.util.Iterator;
  -import java.util.Map;
  -import java.util.Set;
  -
   
   /**
    * @version $Revision$ $Date$
  @@ -73,9 +72,9 @@
   
           principals.add(new PropertiesFileUserPrincipal(username));
   
  -        Enumeration enum = realm.groups.keys();
  -        while (enum.hasMoreElements()) {
  -            String groupName = (String) enum.nextElement();
  +        Enumeration e = realm.groups.keys();
  +        while (e.hasMoreElements()) {
  +            String groupName = (String) e.nextElement();
               Set users = (Set) realm.groups.get(groupName);
               Iterator iter = users.iterator();
               while (iter.hasNext()) {
  
  
  
  1.8       +10 -10    incubator-geronimo/modules/security/src/java/org/apache/geronimo/security/realm/providers/PropertiesFileSecurityRealm.java
  
  Index: PropertiesFileSecurityRealm.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/security/src/java/org/apache/geronimo/security/realm/providers/PropertiesFileSecurityRealm.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- PropertiesFileSecurityRealm.java	2 Jun 2004 05:33:04 -0000	1.7
  +++ PropertiesFileSecurityRealm.java	22 Jun 2004 02:07:37 -0000	1.8
  @@ -111,10 +111,10 @@
               throw new IllegalStateException("Cannot obtain Groups until the realm is started");
           }
           HashSet result = new HashSet();
  -        Enumeration enum = groups.keys();
  +        Enumeration e = groups.keys();
           String group;
  -        while (enum.hasMoreElements()) {
  -            group = (String) enum.nextElement();
  +        while (e.hasMoreElements()) {
  +            group = (String) e.nextElement();
   
               if (regexExpression.match(group)) {
                   result.add(group);
  @@ -136,10 +136,10 @@
               throw new IllegalStateException("Cannot obtain Users until the realm is started");
           }
           HashSet result = new HashSet();
  -        Enumeration enum = users.keys();
  +        Enumeration e = users.keys();
           String user;
  -        while (enum.hasMoreElements()) {
  -            user = (String) enum.nextElement();
  +        while (e.hasMoreElements()) {
  +            user = (String) e.nextElement();
   
               if (regexExpression.match(user)) {
                   result.add(user);
  @@ -156,9 +156,9 @@
               Properties temp = new Properties();
               temp.load(serverInfo.resolve(groupsURI).toURL().openStream());
   
  -            Enumeration enum = temp.keys();
  -            while (enum.hasMoreElements()) {
  -                String groupName = (String) enum.nextElement();
  +            Enumeration e = temp.keys();
  +            while (e.hasMoreElements()) {
  +                String groupName = (String) e.nextElement();
                   String[] userList = ((String) temp.get(groupName)).split(",");
   
                   Set userset = (Set) groups.get(groupName);
  
  
  
  1.6       +4 -5      incubator-geronimo/modules/system/src/java/org/apache/geronimo/system/logging/log4j/appender/ConsoleAppenderService.java
  
  Index: ConsoleAppenderService.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/system/src/java/org/apache/geronimo/system/logging/log4j/appender/ConsoleAppenderService.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ConsoleAppenderService.java	2 Jun 2004 05:33:05 -0000	1.5
  +++ ConsoleAppenderService.java	22 Jun 2004 02:07:37 -0000	1.6
  @@ -19,12 +19,11 @@
   
   import java.util.Enumeration;
   
  -import org.apache.geronimo.gbean.GAttributeInfo;
   import org.apache.geronimo.gbean.GBeanInfo;
   import org.apache.geronimo.gbean.GBeanInfoFactory;
  +import org.apache.log4j.Appender;
   import org.apache.log4j.ConsoleAppender;
   import org.apache.log4j.Logger;
  -import org.apache.log4j.Appender;
   
   /**
    * An extention of the default Log4j DailyRollingFileAppender
  @@ -39,8 +38,8 @@
   
       private static ConsoleAppender getConsoleAppender() {
           Logger root = Logger.getRootLogger();
  -        for(Enumeration enum = root.getAllAppenders(); enum.hasMoreElements();) {
  -            Appender appender = (Appender)enum.nextElement();
  +        for(Enumeration e = root.getAllAppenders(); e.hasMoreElements();) {
  +            Appender appender = (Appender)e.nextElement();
               if (appender instanceof ConsoleAppender) {
                   return (ConsoleAppender)appender;
               }
  
  
  

Mime
View raw message