Author: markt
Date: Sat Dec  6 08:09:55 2014
New Revision: 1643501

URL: http://svn.apache.org/r1643501
Log:
Follow up to r1643367. BZ57309.
Fix unit test failure.

Modified:
    tomcat/tc8.0.x/trunk/   (props changed)
    tomcat/tc8.0.x/trunk/java/org/apache/jasper/tagplugins/jstl/core/Set.java

Propchange: tomcat/tc8.0.x/trunk/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Dec  6 08:09:55 2014
@@ -1 +1 @@
-/tomcat/trunk:1636524,1637156,1637176,1637188,1637331,1637684,1637695,1638720-1638725,1639653,1640010,1640084,1640088,1640275,1640322,1640347,1640361,1640365,1640403,1640410,1640652,1640655-1640658,1640688,1640700-1640883,1640903,1640976,1640978,1641000,1641026,1641038-1641039,1641051-1641052,1641058,1641064,1641300,1641369,1641374,1641380,1641486,1641634,1641656-1641692,1641704,1641707-1641718,1641720-1641722,1641735,1641981,1642668,1642679,1642697,1642699,1643002,1643066,1643121,1643206,1643209-1643210,1643216,1643249,1643270,1643283,1643309-1643310,1643323,1643365-1643366,1643370-1643371,1643474
+/tomcat/trunk:1636524,1637156,1637176,1637188,1637331,1637684,1637695,1638720-1638725,1639653,1640010,1640084,1640088,1640275,1640322,1640347,1640361,1640365,1640403,1640410,1640652,1640655-1640658,1640688,1640700-1640883,1640903,1640976,1640978,1641000,1641026,1641038-1641039,1641051-1641052,1641058,1641064,1641300,1641369,1641374,1641380,1641486,1641634,1641656-1641692,1641704,1641707-1641718,1641720-1641722,1641735,1641981,1642668,1642679,1642697,1642699,1643002,1643066,1643121,1643206,1643209-1643210,1643216,1643249,1643270,1643283,1643309-1643310,1643323,1643365-1643366,1643370-1643371,1643465,1643474

Modified: 
tomcat/tc8.0.x/trunk/java/org/apache/jasper/tagplugins/jstl/core/Set.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/java/org/apache/jasper/tagplugins/jstl/core/Set.java?rev=1643501&r1=1643500&r2=1643501&view=diff
==============================================================================
--- tomcat/tc8.0.x/trunk/java/org/apache/jasper/tagplugins/jstl/core/Set.java 
(original)
+++ tomcat/tc8.0.x/trunk/java/org/apache/jasper/tagplugins/jstl/core/Set.java 
Sat Dec  6 08:09:55 2014
@@ -68,14 +68,14 @@ public class Set implements TagPlugin {
         //get the iScope according to the strScope
         iScope = Util.getScope(strScope);
 
+        String jspCtxt = null;
+        if (ctxt.isTagFile()) {
+            jspCtxt = "this.getJspContext()";
+        } else {
+            jspCtxt = "_jspx_page_context";
+        }
         //if the attribute var has been specified then assign the result to 
the var;
         if(hasVar){
-            String jspCtxt = null;
-            if (ctxt.isTagFile()) {
-                jspCtxt = "this.getJspContext()";
-            } else {
-                jspCtxt = "_jspx_page_context";
-            }
             String strVar = ctxt.getConstantAttribute("var");
             ctxt.generateJavaSource("if(null != " + resultName + "){");
             ctxt.generateJavaSource("    " + jspCtxt + ".setAttribute(\"" + 
strVar + "\"," + resultName + "," + iScope + ");");
@@ -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[]{org.apache.el.lang.ELSupport.coerceToType(" + resultName + ", " + 
methodName + ".getParameterTypes()[0])});");
+            ctxt.generateJavaSource("                        " + methodName + 
".invoke(" + targetName + ", new 
Object[]{org.apache.el.lang.ELSupport.coerceToType(" + jspCtxt + 
".getELContext(), " + resultName + ", " + methodName + 
".getParameterTypes()[0])});");
             ctxt.generateJavaSource("                    }else{");
             ctxt.generateJavaSource("                        " + methodName + 
".invoke(" + targetName + ", new Object[]{null});");
             ctxt.generateJavaSource("                    }");



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to