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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]