cziegeler 2004/02/23 07:24:54
Modified: src/blocks/portal/java/org/apache/cocoon/portal/profile/impl
AuthenticationProfileManager.java
Log:
Avoid NPE
Revision Changes Path
1.17 +7 -2
cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/profile/impl/AuthenticationProfileManager.java
Index: AuthenticationProfileManager.java
===================================================================
RCS file:
/home/cvs/cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/profile/impl/AuthenticationProfileManager.java,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- AuthenticationProfileManager.java 27 Jan 2004 14:58:05 -0000 1.16
+++ AuthenticationProfileManager.java 23 Feb 2004 15:24:54 -0000 1.17
@@ -71,6 +71,7 @@
import org.apache.cocoon.portal.util.DeltaApplicableReferencesAdjustable;
import org.apache.cocoon.portal.util.ProfileException;
import org.apache.cocoon.webapps.authentication.AuthenticationManager;
+import
org.apache.cocoon.webapps.authentication.configuration.ApplicationConfiguration;
import org.apache.cocoon.webapps.authentication.user.RequestState;
import org.apache.cocoon.webapps.authentication.user.UserHandler;
import org.apache.commons.collections.map.LinkedMap;
@@ -121,7 +122,11 @@
throws Exception {
final RequestState state = this.getRequestState();
final UserHandler handler = state.getHandler();
- final Configuration appConf =
state.getApplicationConfiguration().getConfiguration("portal");
+ final ApplicationConfiguration ac =
state.getApplicationConfiguration();
+ if ( ac == null ) {
+ throw new ProcessingException("Configuration for portal not
found in application configuration.");
+ }
+ final Configuration appConf = ac.getConfiguration("portal");
if ( appConf == null ) {
throw new ProcessingException("Configuration for portal not
found in application configuration.");
}