cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject cvs commit: xml-cocoon2/src/java/org/apache/cocoon/webapps/authentication/acting AuthAction.java
Date Tue, 13 Aug 2002 15:29:11 GMT
cziegeler    2002/08/13 08:29:11

  Modified:    src/java/org/apache/cocoon/webapps/authentication/components
                        AuthenticationManager.java
               src/java/org/apache/cocoon/webapps/authentication/acting
                        AuthAction.java
  Log:
  Reduce map creation as suggest by Per Kreipke [per@onclave.com]
  
  Revision  Changes    Path
  1.12      +5 -2      xml-cocoon2/src/java/org/apache/cocoon/webapps/authentication/components/AuthenticationManager.java
  
  Index: AuthenticationManager.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/webapps/authentication/components/AuthenticationManager.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- AuthenticationManager.java	9 Aug 2002 06:20:57 -0000	1.11
  +++ AuthenticationManager.java	13 Aug 2002 15:29:10 -0000	1.12
  @@ -61,6 +61,7 @@
   import org.apache.avalon.framework.configuration.ConfigurationException;
   import org.apache.avalon.framework.parameters.Parameters;
   import org.apache.cocoon.ProcessingException;
  +import org.apache.cocoon.acting.AbstractAction;
   import org.apache.cocoon.components.SitemapConfigurable;
   import org.apache.cocoon.environment.ObjectModelHelper;
   import org.apache.cocoon.environment.Redirector;
  @@ -1407,6 +1408,8 @@
           return this.createParameters(null, this.handlerName, path, this.applicationName);
       }
   
  +    protected static final Map EMPTY_MAP = Collections.unmodifiableMap(new TreeMap());
  +
       /**
        * Create a map for the actions
        * The result is cached!
  @@ -1415,7 +1418,7 @@
       throws ProcessingException {
           if (this.handler == null) {
               // this is only a fallback
  -            return new HashMap();
  +            return EMPTY_MAP;
           }
           SessionContext context = this.getAuthenticationSessionContext(false);
           Map map = (Map)context.getAttribute("cachedmap_" + this.handler.getName());
  
  
  
  1.3       +2 -2      xml-cocoon2/src/java/org/apache/cocoon/webapps/authentication/acting/AuthAction.java
  
  Index: AuthAction.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/webapps/authentication/acting/AuthAction.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- AuthAction.java	29 May 2002 13:38:48 -0000	1.2
  +++ AuthAction.java	13 Aug 2002 15:29:11 -0000	1.3
  @@ -123,7 +123,7 @@
                   if (initialized == false) {
                       map = authManager.createMap();
                   } else {
  -                    map = new HashMap();
  +                    map = EMPTY_MAP;
                   }
               }
           } finally {
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org


Mime
View raw message