Return-Path: Delivered-To: apmail-cocoon-cvs-archive@www.apache.org Received: (qmail 6620 invoked from network); 23 Feb 2004 15:24:56 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 23 Feb 2004 15:24:56 -0000 Received: (qmail 52170 invoked by uid 500); 23 Feb 2004 15:24:50 -0000 Delivered-To: apmail-cocoon-cvs-archive@cocoon.apache.org Received: (qmail 52125 invoked by uid 500); 23 Feb 2004 15:24:50 -0000 Mailing-List: contact cvs-help@cocoon.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@cocoon.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list cvs@cocoon.apache.org Received: (qmail 52114 invoked by uid 500); 23 Feb 2004 15:24:50 -0000 Delivered-To: apmail-cocoon-2.1-cvs@apache.org Received: (qmail 52111 invoked from network); 23 Feb 2004 15:24:50 -0000 Received: from unknown (HELO minotaur.apache.org) (209.237.227.194) by daedalus.apache.org with SMTP; 23 Feb 2004 15:24:50 -0000 Received: (qmail 6585 invoked by uid 1260); 23 Feb 2004 15:24:54 -0000 Date: 23 Feb 2004 15:24:54 -0000 Message-ID: <20040223152454.6584.qmail@minotaur.apache.org> From: cziegeler@apache.org To: cocoon-2.1-cvs@apache.org Subject: cvs commit: cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/profile/impl AuthenticationProfileManager.java X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N 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."); }