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/05/27 14:24:36 UTC
cvs commit: cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/profile/impl AuthenticationProfileManager.java
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;
}