You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by rj...@apache.org on 2008/09/18 19:08:11 UTC
svn commit: r696716 -
/tomcat/trunk/java/org/apache/el/lang/ExpressionBuilder.java
Author: rjung
Date: Thu Sep 18 10:08:10 2008
New Revision: 696716
URL: http://svn.apache.org/viewvc?rev=696716&view=rev
Log:
Fix ClassCastException when we try to cast a
NullPointerException to an ELException.
I still need to investigate where the NPE came from,
but simply casting seems unsafe in any case.
Use a cast if possible and recreate exception
otherwise.
Modified:
tomcat/trunk/java/org/apache/el/lang/ExpressionBuilder.java
Modified: tomcat/trunk/java/org/apache/el/lang/ExpressionBuilder.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/el/lang/ExpressionBuilder.java?rev=696716&r1=696715&r2=696716&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/el/lang/ExpressionBuilder.java (original)
+++ tomcat/trunk/java/org/apache/el/lang/ExpressionBuilder.java Thu Sep 18 10:08:10 2008
@@ -132,7 +132,11 @@
try {
node.accept(this);
} catch (Exception e) {
- throw (ELException) e;
+ if (e instanceof ELException) {
+ throw (ELException) e;
+ } else {
+ throw (new ELException(e));
+ }
}
if (this.fnMapper instanceof FunctionMapperFactory) {
this.fnMapper = ((FunctionMapperFactory) this.fnMapper).create();
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org