This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/tomcat.git
commit bf5b9feca166557134120f0fc5210588c7b3673d Author: Mark Thomas <ma...@apache.org> AuthorDate: Thu Apr 22 17:19:05 2021 +0100 Remove unnecessary code --- java/org/apache/jasper/compiler/Generator.java | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/java/org/apache/jasper/compiler/Generator.java b/java/org/apache/jasper/compiler/Generator.java index c98ddf7..474ac5c 100644 --- a/java/org/apache/jasper/compiler/Generator.java +++ b/java/org/apache/jasper/compiler/Generator.java @@ -2802,10 +2802,12 @@ class Generator { if (varName == null) { varName = n.getTagData().getAttributeString( tagVarInfo.getNameFromAttribute()); - } else if (tagVarInfo.getNameFromAttribute() != null) { - // alias - continue; } + // Alias is not possible here. + // Alias can only be configured for tag files. As SimpleTag + // implementations, isFragment will always be true above + // hence execution never reaches this point. + String tmpVarName = "_jspx_" + varName + "_" + n.getCustomNestingLevel(); out.printin(tmpVarName); @@ -2872,10 +2874,12 @@ class Generator { if (varName == null) { varName = n.getTagData().getAttributeString( tagVarInfo.getNameFromAttribute()); - } else if (tagVarInfo.getNameFromAttribute() != null) { - // alias - continue; } + // Alias is not possible here. + // Alias can only be configured for tag files. As SimpleTag + // implementations, isFragment will always be true above + // hence execution never reaches this point. + String tmpVarName = "_jspx_" + varName + "_" + n.getCustomNestingLevel(); out.printin(varName); --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org