geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r1432974 - /geronimo/external/trunk/tomcat-parent-7.0.27/jasper/src/main/java/org/apache/jasper/tagplugins/jstl/core/Set.java
Date Mon, 14 Jan 2013 16:15:22 GMT
Author: gawor
Date: Mon Jan 14 16:15:22 2013
New Revision: 1432974

URL: http://svn.apache.org/viewvc?rev=1432974&view=rev
Log:
Class cast exception in tagPlugin Set generated code - https://issues.apache.org/bugzilla/show_bug.cgi?id=54338

Modified:
    geronimo/external/trunk/tomcat-parent-7.0.27/jasper/src/main/java/org/apache/jasper/tagplugins/jstl/core/Set.java

Modified: geronimo/external/trunk/tomcat-parent-7.0.27/jasper/src/main/java/org/apache/jasper/tagplugins/jstl/core/Set.java
URL: http://svn.apache.org/viewvc/geronimo/external/trunk/tomcat-parent-7.0.27/jasper/src/main/java/org/apache/jasper/tagplugins/jstl/core/Set.java?rev=1432974&r1=1432973&r2=1432974&view=diff
==============================================================================
--- geronimo/external/trunk/tomcat-parent-7.0.27/jasper/src/main/java/org/apache/jasper/tagplugins/jstl/core/Set.java
(original)
+++ geronimo/external/trunk/tomcat-parent-7.0.27/jasper/src/main/java/org/apache/jasper/tagplugins/jstl/core/Set.java
Mon Jan 14 16:15:22 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("                    }");



Mime
View raw message