From: markt Date: Sat, 29 Aug 2009 13:24:18 +0000 (+0000) Subject: Fix regression in previous fix for https://issues.apache.org/bugzilla/show_bug.cgi... X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=c5940f05b573fc7304530bfbbc5d4adc9a4a8622;p=tomcat7.0 Fix regression in previous fix for https://issues.apache.org/bugzilla/show_bug.cgi?id=38797 Update list of introduced variables before the tag body is processed in case they are used in the tag body. git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@809131 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/java/org/apache/jasper/compiler/Generator.java b/java/org/apache/jasper/compiler/Generator.java index 504a77226..8ec6665c6 100644 --- a/java/org/apache/jasper/compiler/Generator.java +++ b/java/org/apache/jasper/compiler/Generator.java @@ -1747,6 +1747,17 @@ class Generator { 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 { @@ -1798,17 +1809,6 @@ class Generator { 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 DOUBLE_QUOTE = "\\\"";