Author: bruno Date: Tue Aug 24 08:01:32 2004 New Revision: 36813 Modified: cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/notification/DefaultNotifyingBuilder.java Log: sync from trunk The previous version of this file changed the implementation of getRootCause to use common-lang, but didn't take into account that the commons-lang method can return null.
Modified: cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/notification/DefaultNotifyingBuilder.java ============================================================================== --- cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/notification/DefaultNotifyingBuilder.java (original) +++ cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/notification/DefaultNotifyingBuilder.java Tue Aug 24 08:01:32 2004 @@ -173,6 +173,7 @@ * Get root cause Throwable. */ public static Throwable getRootCause (Throwable t) { - return ExceptionUtils.getRootCause(t); + Throwable rootCause = ExceptionUtils.getRootCause(t); + return rootCause != null ? rootCause : t; } }