incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fmesc...@apache.org
Subject svn commit: r609648 - /incubator/sling/whiteboard/fmeschbe/resource/api/src/main/java/org/apache/sling/api/SlingException.java
Date Mon, 07 Jan 2008 15:57:49 GMT
Author: fmeschbe
Date: Mon Jan  7 07:57:48 2008
New Revision: 609648

URL: http://svn.apache.org/viewvc?rev=609648&view=rev
Log:
Ensure proper JDK 1.4 exception chaining not always done by SerlvetException

Modified:
    incubator/sling/whiteboard/fmeschbe/resource/api/src/main/java/org/apache/sling/api/SlingException.java

Modified: incubator/sling/whiteboard/fmeschbe/resource/api/src/main/java/org/apache/sling/api/SlingException.java
URL: http://svn.apache.org/viewvc/incubator/sling/whiteboard/fmeschbe/resource/api/src/main/java/org/apache/sling/api/SlingException.java?rev=609648&r1=609647&r2=609648&view=diff
==============================================================================
--- incubator/sling/whiteboard/fmeschbe/resource/api/src/main/java/org/apache/sling/api/SlingException.java
(original)
+++ incubator/sling/whiteboard/fmeschbe/resource/api/src/main/java/org/apache/sling/api/SlingException.java
Mon Jan  7 07:57:48 2008
@@ -62,6 +62,11 @@
      */
     public SlingException(String text, Throwable cause) {
         super(text, cause);
+        
+        // ensure proper JDK 1.4 exception chaining
+        if (getCause() == null) {
+            initCause(cause); 
+        }
     }
 
     /**
@@ -73,5 +78,10 @@
      */
     public SlingException(Throwable cause) {
         super(cause);
+
+        // ensure proper JDK 1.4 exception chaining
+        if (getCause() == null) {
+            initCause(cause); 
+        }
     }
 }



Mime
View raw message