tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kin...@apache.org
Subject cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler Generator.java
Date Sat, 27 Mar 2004 01:04:39 GMT
kinman      2004/03/26 17:04:39

  Modified:    jasper2/src/share/org/apache/jasper/compiler Tag:
                        tomcat_4_branch Generator.java
  Log:
  - Fix bugzilla 19361: Nested tags with scripting variables generates
    invalid code
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.35.2.23 +19 -3     jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Generator.java
  
  Index: Generator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Generator.java,v
  retrieving revision 1.35.2.22
  retrieving revision 1.35.2.23
  diff -u -r1.35.2.22 -r1.35.2.23
  --- Generator.java	24 Mar 2004 21:31:07 -0000	1.35.2.22
  +++ Generator.java	27 Mar 2004 01:04:39 -0000	1.35.2.23
  @@ -1582,6 +1582,10 @@
   		for (int i=0; i<varInfos.length; i++) {
   		    if (varInfos[i].getScope() != scope)
   			continue;
  +                    // If the scripting variable has been declared, skip codes
  +                    // for saving and restoring it.
  +                    if (n.getScriptingVars(scope).contains(varInfos[i]))
  +                        continue;
   		    String varName = varInfos[i].getVarName();
   		    String tmpVarName = "_jspx_" + varName + "_"
   			+ n.getCustomNestingLevel();
  @@ -1594,6 +1598,10 @@
   		for (int i=0; i<tagVarInfos.length; i++) {
   		    if (tagVarInfos[i].getScope() != scope)
   			continue;
  +                    // If the scripting variable has been declared, skip codes
  +                    // for saving and restoring it.
  +                    if (n.getScriptingVars(scope).contains(tagVarInfos[i]))
  +                        continue;
   		    String varName = tagVarInfos[i].getNameGiven();
   		    if (varName == null) {
   			varName = n.getTagData().getAttributeString(
  @@ -1631,6 +1639,10 @@
   		for (int i=0; i<varInfos.length; i++) {
   		    if (varInfos[i].getScope() != scope)
   			continue;
  +                    // If the scripting variable has been declared, skip codes
  +                    // for saving and restoring it.
  +                    if (n.getScriptingVars(scope).contains(varInfos[i]))
  +                        continue;
   		    String varName = varInfos[i].getVarName();
   		    String tmpVarName = "_jspx_" + varName + "_"
   			+ n.getCustomNestingLevel();
  @@ -1643,6 +1655,10 @@
   		for (int i=0; i<tagVarInfos.length; i++) {
   		    if (tagVarInfos[i].getScope() != scope)
   			continue;
  +                    // If the scripting variable has been declared, skip codes
  +                    // for saving and restoring it.
  +                    if (n.getScriptingVars(scope).contains(tagVarInfos[i]))
  +                        continue;
   		    String varName = tagVarInfos[i].getNameGiven();
   		    if (varName == null) {
   			varName = n.getTagData().getAttributeString(
  
  
  

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


Mime
View raw message