You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by ja...@apache.org on 2011/09/08 11:55:35 UTC
svn commit: r1166592 -
/myfaces/core/branches/2.0.x/api/src/main/java/javax/faces/validator/MethodExpressionValidator.java
Author: jakobk
Date: Thu Sep 8 09:55:35 2011
New Revision: 1166592
URL: http://svn.apache.org/viewvc?rev=1166592&view=rev
Log:
MYFACES-3301 ValidatorExceptions are not properly handled in MethodExpressionValidator.validate() (merge changes in 2.0.x branch)
Modified:
myfaces/core/branches/2.0.x/api/src/main/java/javax/faces/validator/MethodExpressionValidator.java
Modified: myfaces/core/branches/2.0.x/api/src/main/java/javax/faces/validator/MethodExpressionValidator.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.0.x/api/src/main/java/javax/faces/validator/MethodExpressionValidator.java?rev=1166592&r1=1166591&r2=1166592&view=diff
==============================================================================
--- myfaces/core/branches/2.0.x/api/src/main/java/javax/faces/validator/MethodExpressionValidator.java (original)
+++ myfaces/core/branches/2.0.x/api/src/main/java/javax/faces/validator/MethodExpressionValidator.java Thu Sep 8 09:55:35 2011
@@ -63,15 +63,18 @@ public class MethodExpressionValidator i
}
catch (ELException e)
{
- Throwable cause = e.getCause();
- if (cause instanceof ValidatorException)
+ // we need to check for a ValidatorException
+ Throwable cause = e;
+ while ((cause = cause.getCause()) != null)
{
- throw (ValidatorException)cause;
- }
- else
- {
- throw e;
+ if (cause instanceof ValidatorException)
+ {
+ throw (ValidatorException)cause;
+ }
}
+
+ // no ValidatorException found, re-throw ELException
+ throw e;
}
}