Return-Path: Delivered-To: apmail-xml-cocoon-cvs-archive@xml.apache.org Received: (qmail 26031 invoked by uid 500); 27 May 2003 12:24:36 -0000 Mailing-List: contact cocoon-cvs-help@xml.apache.org; run by ezmlm Precedence: bulk Reply-To: cocoon-dev@xml.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list cocoon-cvs@xml.apache.org Received: (qmail 26013 invoked by uid 500); 27 May 2003 12:24:36 -0000 Delivered-To: apmail-cocoon-2.1-cvs@apache.org Received: (qmail 26001 invoked from network); 27 May 2003 12:24:36 -0000 Received: from icarus.apache.org (208.185.179.13) by daedalus.apache.org with SMTP; 27 May 2003 12:24:36 -0000 Received: (qmail 27296 invoked by uid 1260); 27 May 2003 12:24:36 -0000 Date: 27 May 2003 12:24:36 -0000 Message-ID: <20030527122436.27295.qmail@icarus.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 cziegeler 2003/05/27 05:24:36 Modified: src/blocks/portal/java/org/apache/cocoon/portal/profile/impl AuthenticationProfileManager.java Log: Using commons.lang ExceptionUtils. Thanks, Sylvain! Revision Changes Path 1.2 +3 -10 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.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- AuthenticationProfileManager.java 27 May 2003 11:54:18 -0000 1.1 +++ AuthenticationProfileManager.java 27 May 2003 12:24:36 -0000 1.2 @@ -58,7 +58,6 @@ import java.util.Map; import org.apache.avalon.framework.CascadingRuntimeException; -import org.apache.avalon.framework.CascadingThrowable; import org.apache.avalon.framework.component.Component; import org.apache.avalon.framework.component.ComponentException; import org.apache.avalon.framework.component.ComponentManager; @@ -79,10 +78,10 @@ import org.apache.cocoon.webapps.authentication.AuthenticationManager; import org.apache.cocoon.webapps.authentication.user.RequestState; import org.apache.cocoon.webapps.authentication.user.UserHandler; +import org.apache.commons.lang.exception.ExceptionUtils; import org.apache.excalibur.source.SourceNotFoundException; import org.apache.excalibur.source.SourceValidity; import org.exolab.castor.mapping.Mapping; -import org.xml.sax.SAXException; /** * The profile manager using the authentication framework @@ -471,13 +470,7 @@ if (t instanceof SourceNotFoundException) { return true; } - if (t instanceof CascadingThrowable) { - t = ((CascadingThrowable)t).getCause(); - } else if ( t instanceof SAXException ) { - t = ((SAXException)t).getCause(); - } else { - t = null; - } + t = ExceptionUtils.getCause(t); } return false; }