You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by fu...@apache.org on 2007/12/27 03:10:38 UTC
svn commit: r606996 - /tomcat/trunk/java/org/apache/el/parser/AstValue.java
Author: funkman
Date: Wed Dec 26 18:10:38 2007
New Revision: 606996
URL: http://svn.apache.org/viewvc?rev=606996&view=rev
Log:
http://issues.apache.org/bugzilla/show_bug.cgi?id=43285
Missing EL Coercion causes argument type mismatch
Patch by Bernhard Huemer bernhard.huemers gmail com
Modified:
tomcat/trunk/java/org/apache/el/parser/AstValue.java
Modified: tomcat/trunk/java/org/apache/el/parser/AstValue.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/el/parser/AstValue.java?rev=606996&r1=606995&r2=606996&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/el/parser/AstValue.java (original)
+++ tomcat/trunk/java/org/apache/el/parser/AstValue.java Wed Dec 26 18:10:38 2007
@@ -26,6 +26,7 @@
import javax.el.MethodInfo;
import javax.el.PropertyNotFoundException;
+import org.apache.el.lang.ELSupport;
import org.apache.el.lang.EvaluationContext;
import org.apache.el.util.MessageFactory;
import org.apache.el.util.ReflectionUtil;
@@ -127,7 +128,11 @@
throws ELException {
Target t = getTarget(ctx);
ctx.setPropertyResolved(false);
- ctx.getELResolver().setValue(ctx, t.base, t.property, value);
+ ELResolver resolver = ctx.getELResolver();
+ resolver.setValue(ctx, t.base, t.property,
+ // coerce to the expected type
+ ELSupport.coerceToType(value,
+ resolver.getType(ctx, t.base, t.property)));
}
public MethodInfo getMethodInfo(EvaluationContext ctx, Class[] paramTypes)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org