Author: markt
Date: Sat Nov  9 22:59:55 2013
New Revision: 1540421

URL: http://svn.apache.org/r1540421
Log:
Follow up to r1539173.
Remove unused xmlEscape flag.

Modified:
    tomcat/trunk/java/org/apache/jasper/compiler/ELInterpreter.java
    tomcat/trunk/java/org/apache/jasper/compiler/ELInterpreterFactory.java
    tomcat/trunk/java/org/apache/jasper/compiler/Generator.java
    tomcat/trunk/java/org/apache/jasper/compiler/JspUtil.java
    tomcat/trunk/java/org/apache/jasper/runtime/JspRuntimeLibrary.java
    tomcat/trunk/java/org/apache/jasper/runtime/PageContextImpl.java
    tomcat/trunk/test/org/apache/jasper/compiler/TestELInterpreterFactory.java

Modified: tomcat/trunk/java/org/apache/jasper/compiler/ELInterpreter.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/ELInterpreter.java?rev=1540421&r1=1540420&r2=1540421&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/compiler/ELInterpreter.java (original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/ELInterpreter.java Sat Nov  9 
22:59:55 2013
@@ -31,16 +31,15 @@ public interface ELInterpreter {
      * servlet generated for JSP. The default implementation creates a call to
      * {@link org.apache.jasper.runtime.PageContextImpl#proprietaryEvaluate(
      * String, Class, javax.servlet.jsp.PageContext,
-     * org.apache.jasper.runtime.ProtectedFunctionMapper, boolean)} but other
+     * org.apache.jasper.runtime.ProtectedFunctionMapper)} but other
      * implementations may produce more optimised code.
      *
      * @param expression a String containing zero or more "${}" expressions
      * @param expectedType the expected type of the interpreted result
      * @param fnmapvar Variable pointing to a function map.
-     * @param xmlEscape True if the result should do XML escaping
      * @return a String representing a call to the EL interpreter.
      */
     public String interpreterCall(JspCompilationContext context,
             boolean isTagFile, String expression,
-            Class<?> expectedType, String fnmapvar, boolean xmlEscape);
+            Class<?> expectedType, String fnmapvar);
 }

Modified: tomcat/trunk/java/org/apache/jasper/compiler/ELInterpreterFactory.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/ELInterpreterFactory.java?rev=1540421&r1=1540420&r2=1540421&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/compiler/ELInterpreterFactory.java 
(original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/ELInterpreterFactory.java Sat 
Nov  9 22:59:55 2013
@@ -96,9 +96,9 @@ public class ELInterpreterFactory {
         @Override
         public String interpreterCall(JspCompilationContext context,
                 boolean isTagFile, String expression,
-                Class<?> expectedType, String fnmapvar, boolean xmlEscape) {
+                Class<?> expectedType, String fnmapvar) {
             return JspUtil.interpreterCall(isTagFile, expression, expectedType,
-                    fnmapvar, xmlEscape);
+                    fnmapvar);
         }
     }
 }

Modified: tomcat/trunk/java/org/apache/jasper/compiler/Generator.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/Generator.java?rev=1540421&r1=1540420&r2=1540421&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/compiler/Generator.java (original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/Generator.java Sat Nov  9 
22:59:55 2013
@@ -820,7 +820,7 @@ class Generator {
          *            attributes that aren't EL expressions)
          */
         private String attributeValue(Node.JspAttribute attr, boolean encode,
-                Class<?> expectedType, boolean isXml) {
+                Class<?> expectedType) {
             String v = attr.getValue();
             if (!attr.isNamedAttribute() && (v == null))
                 return "";
@@ -833,7 +833,7 @@ class Generator {
                 return v;
             } else if (attr.isELInterpreterInput()) {
                 v = elInterpreter.interpreterCall(ctxt, this.isTagFile, v,
-                        expectedType, attr.getEL().getMapName(), isXml);
+                        expectedType, attr.getEL().getMapName());
                 if (encode) {
                     return 
"org.apache.jasper.runtime.JspRuntimeLibrary.URLEncode("
                             + v + ", request.getCharacterEncoding())";
@@ -878,8 +878,7 @@ class Generator {
                             + "URLEncode(" + quote(n.getTextAttribute("name"))
                             + ", request.getCharacterEncoding())");
                     out.print("+ \"=\" + ");
-                    out.print(attributeValue(n.getValue(), true, String.class,
-                            n.getRoot().isXmlSyntax()));
+                    out.print(attributeValue(n.getValue(), true, 
String.class));
 
                     // The separator is '&' after the second use
                     separator = "\"&\"";
@@ -921,7 +920,7 @@ class Generator {
                 out.printil("out.write("
                         + elInterpreter.interpreterCall(ctxt, this.isTagFile,
                                 n.getType() + "{" + n.getText() + "}",
-                                String.class, n.getEL().getMapName(), false) +
+                                String.class, n.getEL().getMapName()) +
                         ");");
             } else {
                 out.printil("out.write("
@@ -950,8 +949,7 @@ class Generator {
                 pageParam = generateNamedAttributeValue(page
                         .getNamedAttributeNode());
             } else {
-                pageParam = attributeValue(page, false, String.class,
-                        n.getRoot().isXmlSyntax());
+                pageParam = attributeValue(page, false, String.class);
             }
 
             // If any of the params have their values specified by
@@ -1037,8 +1035,7 @@ class Generator {
                 pageParam = generateNamedAttributeValue(page
                         .getNamedAttributeNode());
             } else {
-                pageParam = attributeValue(page, false, String.class,
-                        n.getRoot().isXmlSyntax());
+                pageParam = attributeValue(page, false, String.class);
             }
 
             // If any of the params have their values specified by
@@ -1145,8 +1142,7 @@ class Generator {
                         + "_jspx_page_context.findAttribute(\""
                         + name
                         + "\"), \"" + property + "\",");
-                out.print(attributeValue(value, false, null,
-                        n.getRoot().isXmlSyntax()));
+                out.print(attributeValue(value, false, null));
                 out.println(");");
             } else if (value.isELInterpreterInput()) {
                 // We've got to resolve the very call to the interpreter
@@ -1191,8 +1187,7 @@ class Generator {
                         + "_jspx_page_context.findAttribute(\""
                         + name
                         + "\"), \"" + property + "\", ");
-                out.print(attributeValue(value, false, null,
-                        n.getRoot().isXmlSyntax()));
+                out.print(attributeValue(value, false, null));
                 out.println(", null, null, false);");
             }
 
@@ -1323,8 +1318,7 @@ class Generator {
                             binaryName = generateNamedAttributeValue(beanName
                                     .getNamedAttributeNode());
                         } else {
-                            binaryName = attributeValue(beanName, false,
-                                    String.class, n.getRoot().isXmlSyntax());
+                            binaryName = attributeValue(beanName, false, 
String.class);
                         }
                     } else {
                         // Implies klass is not null
@@ -1437,8 +1431,7 @@ class Generator {
                                 escape(name) +
                                 "\\\" value=\\\"\" + " +
                                 attributeValue(n.getValue(), false,
-                                        String.class,
-                                        n.getRoot().isXmlSyntax()) +
+                                        String.class) +
                                 " + \"\\\">\" );");
                         out.printil("out.write(\"\\n\");");
                     } else {
@@ -1448,8 +1441,7 @@ class Generator {
                                 escape(name) +
                                 "=\\\"\" + " +
                                 attributeValue(n.getValue(), false,
-                                        String.class,
-                                        n.getRoot().isXmlSyntax()) +
+                                        String.class) +
                                 " + \"\\\"\" );");
                     }
 
@@ -1477,8 +1469,7 @@ class Generator {
                     widthStr = generateNamedAttributeValue(width
                             .getNamedAttributeNode());
                 } else {
-                    widthStr = attributeValue(width, false, String.class,
-                            n.getRoot().isXmlSyntax());
+                    widthStr = attributeValue(width, false, String.class);
                 }
             }
 
@@ -1488,8 +1479,7 @@ class Generator {
                     heightStr = generateNamedAttributeValue(height
                             .getNamedAttributeNode());
                 } else {
-                    heightStr = attributeValue(height, false, String.class,
-                            n.getRoot().isXmlSyntax());
+                    heightStr = attributeValue(height, false, String.class);
                 }
             }
 
@@ -1844,8 +1834,7 @@ class Generator {
                     out.print("=");
                     if (jspAttrs[i].isELInterpreterInput()) {
                         out.print("\\\"\" + ");
-                        String debug = attributeValue(jspAttrs[i], false,
-                                String.class, n.getRoot().isXmlSyntax());
+                        String debug = attributeValue(jspAttrs[i], false, 
String.class);
                         out.print(debug);
                         out.print(" + \"\\\"");
                     } else {
@@ -1894,8 +1883,7 @@ class Generator {
                     if (omitAttr == null) {
                         omit = "false";
                     } else {
-                        omit = attributeValue(omitAttr, false, boolean.class,
-                                n.getRoot().isXmlSyntax());
+                        omit = attributeValue(omitAttr, false, boolean.class);
                         if ("true".equals(omit)) {
                             continue;
                         }
@@ -1911,8 +1899,7 @@ class Generator {
                                 " + \"\\\"\")";
                     }
                 } else {
-                    value = attributeValue(attrs[i], false, Object.class,
-                            n.getRoot().isXmlSyntax());
+                    value = attributeValue(attrs[i], false, Object.class);
                     nvp = " + \" " + attrs[i].getName() + "=\\\"\" + " +
                             value + " + \"\\\"\"";
                 }
@@ -1921,8 +1908,7 @@ class Generator {
 
             // Write begin tag, using XML-style 'name' attribute as the
             // element name
-            String elemName = attributeValue(n.getNameAttribute(), false,
-                    String.class, n.getRoot().isXmlSyntax());
+            String elemName = attributeValue(n.getNameAttribute(), false, 
String.class);
             out.printin("out.write(\"<\"");
             out.print(" + " + elemName);
 
@@ -2993,7 +2979,7 @@ class Generator {
                     String mapName = (attr.getEL() != null) ? attr.getEL()
                             .getMapName() : null;
                     attrValue = elInterpreter.interpreterCall(ctxt,
-                            this.isTagFile, attrValue, c[0], mapName, false);
+                            this.isTagFile, attrValue, c[0], mapName);
                 }
             } else {
                 attrValue = convertString(c[0], attrValue, localName,

Modified: tomcat/trunk/java/org/apache/jasper/compiler/JspUtil.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/JspUtil.java?rev=1540421&r1=1540420&r2=1540421&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/compiler/JspUtil.java (original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/JspUtil.java Sat Nov  9 
22:59:55 2013
@@ -335,12 +335,10 @@ public class JspUtil {
      *            the expected type of the interpreted result
      * @param fnmapvar
      *            Variable pointing to a function map.
-     * @param XmlEscape
-     *            True if the result should do XML escaping
      * @return a String representing a call to the EL interpreter.
      */
     public static String interpreterCall(boolean isTagFile, String expression,
-            Class<?> expectedType, String fnmapvar, boolean XmlEscape) {
+            Class<?> expectedType, String fnmapvar) {
         /*
          * Determine which context object to use.
          */
@@ -386,10 +384,6 @@ public class JspUtil {
             }
         }
 
-        if (primitiveConverterMethod != null) {
-            XmlEscape = false;
-        }
-
         /*
          * Build up the base call to the interpreter.
          */
@@ -412,7 +406,7 @@ public class JspUtil {
                         + 
"org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate"
                         + "(" + Generator.quote(expression) + ", " + targetType
                         + ".class, " + "(javax.servlet.jsp.PageContext)" + 
jspCtxt + ", "
-                        + fnmapvar + ", " + XmlEscape + ")");
+                        + fnmapvar + ")");
 
         /*
          * Add the primitive converter method if we need to.

Modified: tomcat/trunk/java/org/apache/jasper/runtime/JspRuntimeLibrary.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/runtime/JspRuntimeLibrary.java?rev=1540421&r1=1540420&r2=1540421&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/runtime/JspRuntimeLibrary.java 
(original)
+++ tomcat/trunk/java/org/apache/jasper/runtime/JspRuntimeLibrary.java Sat Nov  
9 22:59:55 2013
@@ -594,8 +594,7 @@ public class JspRuntimeLibrary {
                     expression,
                     method.getParameterTypes()[0],
                     pageContext,
-                    functionMapper,
-                    false )
+                    functionMapper)
             });
         } catch (Exception ex) {
             Throwable thr = ExceptionUtils.unwrapInvocationTargetException(ex);

Modified: tomcat/trunk/java/org/apache/jasper/runtime/PageContextImpl.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/runtime/PageContextImpl.java?rev=1540421&r1=1540420&r2=1540421&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/runtime/PageContextImpl.java (original)
+++ tomcat/trunk/java/org/apache/jasper/runtime/PageContextImpl.java Sat Nov  9 
22:59:55 2013
@@ -920,7 +920,7 @@ public class PageContextImpl extends Pag
      */
     public static Object proprietaryEvaluate(final String expression,
             final Class<?> expectedType, final PageContext pageContext,
-            final ProtectedFunctionMapper functionMap, final boolean escape)
+            final ProtectedFunctionMapper functionMap)
             throws ELException {
         Object retValue;
         final ExpressionFactory exprFactory = 
jspf.getJspApplicationContext(pageContext.getServletContext()).getExpressionFactory();

Modified: 
tomcat/trunk/test/org/apache/jasper/compiler/TestELInterpreterFactory.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/jasper/compiler/TestELInterpreterFactory.java?rev=1540421&r1=1540420&r2=1540421&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/jasper/compiler/TestELInterpreterFactory.java 
(original)
+++ tomcat/trunk/test/org/apache/jasper/compiler/TestELInterpreterFactory.java 
Sat Nov  9 22:59:55 2013
@@ -36,7 +36,7 @@ public class TestELInterpreterFactory ex
         @Override
         public String interpreterCall(JspCompilationContext context,
                 boolean isTagFile, String expression, Class<?> expectedType,
-                String fnmapvar, boolean xmlEscape) {
+                String fnmapvar) {
             return expression;
         }
     }



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

Reply via email to