You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by cz...@apache.org on 2003/10/23 13:29:36 UTC
cvs commit: cocoon-2.1/src/blocks/authentication-fw/java/org/apache/cocoon/webapps/authentication/components DefaultAuthenticationManager.java PipelineAuthenticator.java
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
}