cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject cvs commit: cocoon-2.1/src/blocks/authentication-fw/java/org/apache/cocoon/webapps/authentication/components DefaultAuthenticationManager.java PipelineAuthenticator.java
Date Thu, 23 Oct 2003 11:29:36 GMT
cziegeler    2003/10/23 04:29:36

  Modified:    src/blocks/authentication-fw/java/org/apache/cocoon/webapps/authentication/components
                        DefaultAuthenticationManager.java
                        PipelineAuthenticator.java
  Log:
  Moving loading of applications out of the Authenticator.
  This should fix the NPE reported by Laurent Trillaud.
  
  Revision  Changes    Path
  1.18      +11 -1     cocoon-2.1/src/blocks/authentication-fw/java/org/apache/cocoon/webapps/authentication/components/DefaultAuthenticationManager.java
  
  Index: DefaultAuthenticationManager.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/authentication-fw/java/org/apache/cocoon/webapps/authentication/components/DefaultAuthenticationManager.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- DefaultAuthenticationManager.java	24 Sep 2003 21:22:33 -0000	1.17
  +++ DefaultAuthenticationManager.java	23 Oct 2003 11:29:36 -0000	1.18
  @@ -78,6 +78,7 @@
   import org.apache.cocoon.util.ClassUtils;
   import org.apache.cocoon.webapps.authentication.AuthenticationConstants;
   import org.apache.cocoon.webapps.authentication.AuthenticationManager;
  +import org.apache.cocoon.webapps.authentication.configuration.ApplicationConfiguration;
   import org.apache.cocoon.webapps.authentication.configuration.HandlerConfiguration;
   import org.apache.cocoon.webapps.authentication.user.RequestState;
   import org.apache.cocoon.webapps.authentication.user.UserHandler;
  @@ -252,6 +253,15 @@
               this.setState( state );
               state.initialize( this.resolver );
               
  +            // And now load applications
  +            Iterator applications = handler.getHandlerConfiguration().getApplications().values().iterator();
  +
  +            while ( applications.hasNext() ) {
  +                ApplicationConfiguration appHandler = (ApplicationConfiguration)applications.next();
  +                if ( !appHandler.getLoadOnDemand() ) {
  +                    handler.getContext().loadApplicationXML( appHandler, this.resolver
);
  +                }
  +            }
           }
           
    		return handler;
  
  
  
  1.5       +1 -13     cocoon-2.1/src/blocks/authentication-fw/java/org/apache/cocoon/webapps/authentication/components/PipelineAuthenticator.java
  
  Index: PipelineAuthenticator.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/authentication-fw/java/org/apache/cocoon/webapps/authentication/components/PipelineAuthenticator.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- PipelineAuthenticator.java	24 Sep 2003 21:22:33 -0000	1.4
  +++ PipelineAuthenticator.java	23 Oct 2003 11:29:36 -0000	1.5
  @@ -51,7 +51,6 @@
   package org.apache.cocoon.webapps.authentication.components;
   
   import java.io.IOException;
  -import java.util.Iterator;
   
   import org.apache.avalon.framework.activity.Disposable;
   import org.apache.avalon.framework.context.Context;
  @@ -63,7 +62,6 @@
   import org.apache.avalon.framework.service.Serviceable;
   import org.apache.avalon.framework.thread.ThreadSafe;
   import org.apache.cocoon.ProcessingException;
  -import org.apache.cocoon.webapps.authentication.configuration.ApplicationConfiguration;
   import org.apache.cocoon.webapps.authentication.configuration.HandlerConfiguration;
   import org.apache.cocoon.webapps.authentication.context.AuthenticationContext;
   import org.apache.cocoon.webapps.authentication.user.UserHandler;
  @@ -255,16 +253,6 @@
   
                       // store the authentication data in the context
                       authContext.init(doc);
  -
  -                    // And now load applications
  -                    Iterator applications = configuration.getApplications().values().iterator();
  -
  -                    while ( applications.hasNext() ) {
  -                        ApplicationConfiguration appHandler = (ApplicationConfiguration)applications.next();
  -                        if ( !appHandler.getLoadOnDemand() ) {
  -                            handler.getContext().loadApplicationXML( appHandler, this.resolver
);
  -                        }
  -                    }
   
                   } // end sync
               }
  
  
  

Mime
View raw message