Port fix for bug 42438. Duplicate temp variable was created. Patch provided by Brian...
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Wed, 23 May 2007 02:42:08 +0000 (02:42 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Wed, 23 May 2007 02:42:08 +0000 (02:42 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk@540810 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/jasper/compiler/Node.java
webapps/docs/changelog.xml

index 7e9fdf9..fc05627 100644 (file)
@@ -1861,7 +1861,6 @@ abstract class Node implements TagConstants {
 
             super(qName, ATTRIBUTE_ACTION, attrs, nonTaglibXmlnsAttrs,
                     taglibAttrs, start, parent);
-            temporaryVariableName = JspUtil.nextTemporaryVariableName();
             if ("false".equals(this.getAttributeValue("trim"))) {
                 // (if null or true, leave default of true)
                 trim = false;
@@ -1908,6 +1907,9 @@ abstract class Node implements TagConstants {
          *         (this probably could go elsewhere, but it's convenient here)
          */
         public String getTemporaryVariableName() {
+            if (temporaryVariableName == null) {
+                temporaryVariableName = JspUtil.nextTemporaryVariableName();
+            }
             return temporaryVariableName;
         }
 
index c450011..5f29218 100644 (file)
       </fix>
     </changelog>
   </subsection>
+  <subsection name="Jasper">
+    <changelog>
+      <fix>
+        <bug>42438</bug> Duplicate temporary variables were created when
+        jsp:attribute was used in conjunction with custom tags. Patch provided
+        by Brian Lenz. (markt)
+      </fix>
+    </changelog>
+  </subsection>
   <subsection name="Webapps">
     <changelog>
       <fix>