myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mat...@apache.org
Subject svn commit: r810488 - /myfaces/trinidad/branches/1.2.12.1-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXComponentBase.java
Date Wed, 02 Sep 2009 12:46:55 GMT
Author: matzew
Date: Wed Sep  2 12:46:55 2009
New Revision: 810488

URL: http://svn.apache.org/viewvc?rev=810488&view=rev
Log:
TRINIDAD-1563 - UIXComponentBase.broadcastToMethodBinding() should handle AbortProcessingException
that is wrapped in more than one layer

thanks to jing wu for her patch

Modified:
    myfaces/trinidad/branches/1.2.12.1-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXComponentBase.java

Modified: myfaces/trinidad/branches/1.2.12.1-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXComponentBase.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.12.1-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXComponentBase.java?rev=810488&r1=810487&r2=810488&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.12.1-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXComponentBase.java
(original)
+++ myfaces/trinidad/branches/1.2.12.1-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXComponentBase.java
Wed Sep  2 12:46:55 2009
@@ -1246,10 +1246,17 @@
       }
       catch (EvaluationException ee)
       {
-        Throwable t = ee.getCause();
-        // Unwrap AbortProcessingExceptions
-        if (t instanceof AbortProcessingException)
-          throw ((AbortProcessingException) t);
+        // Checking for AbortProcessingExceptions, and unwrapping
+        // it if the underlying exception is AbortProcessingExceptions.
+        Throwable currentThrowable = ee.getCause();
+        while (currentThrowable != null)
+        {
+          if (currentThrowable instanceof AbortProcessingException)
+          {
+            throw ((AbortProcessingException)currentThrowable);
+          }
+          currentThrowable = currentThrowable.getCause();
+        }
         throw ee;
       }
     }



Mime
View raw message