Author: markt Date: Mon May 21 19:22:55 2007 New Revision: 540397 URL: http://svn.apache.org/viewvc?view=rev&rev=540397 Log: Fix bug 42438. Duplicate temp variable was created. Patch provided by Brian Lenz.
Modified: tomcat/container/tc5.5.x/webapps/docs/changelog.xml tomcat/jasper/tc5.5.x/src/share/org/apache/jasper/compiler/Node.java Modified: tomcat/container/tc5.5.x/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/webapps/docs/changelog.xml?view=diff&rev=540397&r1=540396&r2=540397 ============================================================================== --- tomcat/container/tc5.5.x/webapps/docs/changelog.xml (original) +++ tomcat/container/tc5.5.x/webapps/docs/changelog.xml Mon May 21 19:22:55 2007 @@ -180,6 +180,11 @@ <fix> Fix a logging related memory leak in PageContextImpl. (markt) </fix> + <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> </section> Modified: tomcat/jasper/tc5.5.x/src/share/org/apache/jasper/compiler/Node.java URL: http://svn.apache.org/viewvc/tomcat/jasper/tc5.5.x/src/share/org/apache/jasper/compiler/Node.java?view=diff&rev=540397&r1=540396&r2=540397 ============================================================================== --- tomcat/jasper/tc5.5.x/src/share/org/apache/jasper/compiler/Node.java (original) +++ tomcat/jasper/tc5.5.x/src/share/org/apache/jasper/compiler/Node.java Mon May 21 19:22:55 2007 @@ -1789,7 +1789,6 @@ 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; @@ -1836,6 +1835,9 @@ * (this probably could go elsewhere, but it's convenient here) */ public String getTemporaryVariableName() { + if (temporaryVariableName == null) { + temporaryVariableName = JspUtil.nextTemporaryVariableName(); + } return temporaryVariableName; } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]