Author: remy.maucherat(a)jboss.com
Date: 2009-08-31 05:34:38 -0400 (Mon, 31 Aug 2009)
New Revision: 1149
Modified:
trunk/java/org/apache/jasper/compiler/Generator.java
Log:
- Port regression fix: Update list of introduced variables before the tag body is
processed in case they are used in the tag body.
Modified: trunk/java/org/apache/jasper/compiler/Generator.java
===================================================================
--- trunk/java/org/apache/jasper/compiler/Generator.java 2009-08-31 09:34:00 UTC (rev
1148)
+++ trunk/java/org/apache/jasper/compiler/Generator.java 2009-08-31 09:34:38 UTC (rev
1149)
@@ -1764,6 +1764,17 @@
generateLocalVariables(out, n);
}
+ // Add the named objects to the list of 'introduced' names to enable
+ // a later test as per JSP.5.3
+ VariableInfo[] infos = n.getVariableInfos();
+ if (infos != null && infos.length > 0) {
+ for (int i = 0; i < infos.length; i++) {
+ VariableInfo info = infos[i];
+ if (info != null && info.getVarName() != null)
+ pageInfo.getVarInfoNames().add(info.getVarName());
+ }
+ }
+
if (n.implementsSimpleTag()) {
generateCustomDoTag(n, handlerInfo, tagHandlerVar);
} else {
@@ -1815,17 +1826,6 @@
out = outSave;
}
- // Add the named objects to the list of 'introduced' names to enable
- // a later test as per JSP.5.3
- VariableInfo[] infos = n.getVariableInfos();
- if (infos != null && infos.length > 0) {
- for (int i = 0; i < infos.length; i++) {
- VariableInfo info = infos[i];
- if (info != null && info.getVarName() != null)
- pageInfo.getVarInfoNames().add(info.getVarName());
- }
- }
-
}
private static final String SINGLE_QUOTE = "'";
Show replies by date