You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2013/01/04 23:04:04 UTC
svn commit: r1429153 -
/tomcat/trunk/java/org/apache/jasper/tagplugins/jstl/core/Set.java
Author: markt
Date: Fri Jan 4 22:04:04 2013
New Revision: 1429153
URL: http://svn.apache.org/viewvc?rev=1429153&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=54338
Correctly coerce the value to the expected type when using the tag plug-in for the JSTL set tag
Modified:
tomcat/trunk/java/org/apache/jasper/tagplugins/jstl/core/Set.java
Modified: tomcat/trunk/java/org/apache/jasper/tagplugins/jstl/core/Set.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/tagplugins/jstl/core/Set.java?rev=1429153&r1=1429152&r2=1429153&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/tagplugins/jstl/core/Set.java (original)
+++ tomcat/trunk/java/org/apache/jasper/tagplugins/jstl/core/Set.java Fri Jan 4 22:04:04 2013
@@ -144,7 +144,7 @@ public class Set implements TagPlugin {
//invoke the method through the reflection
ctxt.generateJavaSource(" if(" + resultName + " != null){");
- ctxt.generateJavaSource(" " + methodName + ".invoke(" + targetName + ", new Object[]{(" + methodName + ".getParameterTypes()[0]).cast(" + resultName + ")});");
+ ctxt.generateJavaSource(" " + methodName + ".invoke(" + targetName + ", new Object[]{org.apache.el.lang.ELSupport.coerceToType(" + resultName + ", " + methodName + ".getParameterTypes()[0])});");
ctxt.generateJavaSource(" }else{");
ctxt.generateJavaSource(" " + methodName + ".invoke(" + targetName + ", new Object[]{null});");
ctxt.generateJavaSource(" }");
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org