You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ji...@apache.org on 2007/12/30 18:57:40 UTC

svn commit: r607569 - in /tomcat/tc6.0.x/trunk: STATUS.txt java/org/apache/el/parser/AstValue.java

Author: jim
Date: Sun Dec 30 09:57:39 2007
New Revision: 607569

URL: http://svn.apache.org/viewvc?rev=607569&view=rev
Log:
Merge r606996 from trunk:

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


Submitted by: funkman
Reviewed by: jim

Modified:
    tomcat/tc6.0.x/trunk/STATUS.txt
    tomcat/tc6.0.x/trunk/java/org/apache/el/parser/AstValue.java

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=607569&r1=607568&r2=607569&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Sun Dec 30 09:57:39 2007
@@ -42,12 +42,6 @@
   +1: markt,funkman, pero, yoavs
   -1:
 
-* Fix http://issues.apache.org/bugzilla/show_bug.cgi?id=43285
-  Missing EL Coercion causes argument type mismatch
-  http://svn.apache.org/viewvc?rev=606996&view=rev
-  +1: funkman, markt, pero, yoavs, jim
-  -1: 
-
 * Fix http://issues.apache.org/bugzilla/show_bug.cgi?id=43868
   MBean methods getInvoke() and getSetter() were broken
   http://svn.apache.org/viewvc?rev=607483&view=rev

Modified: tomcat/tc6.0.x/trunk/java/org/apache/el/parser/AstValue.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/el/parser/AstValue.java?rev=607569&r1=607568&r2=607569&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/el/parser/AstValue.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/el/parser/AstValue.java Sun Dec 30 09:57:39 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