Author: bruno
Date: Tue Aug 24 03:52:55 2004
New Revision: 36811

Modified:
   
cocoon/trunk/src/java/org/apache/cocoon/components/notification/DefaultNotifyingBuilder.java
Log:
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/trunk/src/java/org/apache/cocoon/components/notification/DefaultNotifyingBuilder.java
==============================================================================
--- 
cocoon/trunk/src/java/org/apache/cocoon/components/notification/DefaultNotifyingBuilder.java
        (original)
+++ 
cocoon/trunk/src/java/org/apache/cocoon/components/notification/DefaultNotifyingBuilder.java
        Tue Aug 24 03:52:55 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;
     }
 }

Reply via email to