You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2021/04/20 07:33:33 UTC

[tomcat] 01/04: Remove unnecessary code

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 b837cda08007a93e4be0dc48f6f8e02e0ae451b8
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Mon Apr 19 18:09:59 2021 +0100

    Remove unnecessary code
---
 java/org/apache/jasper/compiler/Generator.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/jasper/compiler/Generator.java b/java/org/apache/jasper/compiler/Generator.java
index 0f47b54..3125fb5 100644
--- a/java/org/apache/jasper/compiler/Generator.java
+++ b/java/org/apache/jasper/compiler/Generator.java
@@ -1855,7 +1855,9 @@ class Generator {
             // 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) {
+            // The Validator always calls setTagData() which ensures infos is
+            // non-null
+            if (infos.length > 0) {
                 for (VariableInfo info : infos) {
                     if (info != null && info.getVarName() != null)
                         pageInfo.getVarInfoNames().add(info.getVarName());

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