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/08 16:55:56 UTC

[tomcat] branch 9.0.x updated: Remove unnecessary code. parent is always non-null

This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/9.0.x by this push:
     new b74ac4f  Remove unnecessary code. parent is always non-null
b74ac4f is described below

commit b74ac4f36a492f4a1dc84919d0ac64de09aec650
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Thu Apr 8 17:54:47 2021 +0100

    Remove unnecessary code. parent is always non-null
---
 java/org/apache/jasper/compiler/Generator.java | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/java/org/apache/jasper/compiler/Generator.java b/java/org/apache/jasper/compiler/Generator.java
index 389159f..3570e57 100644
--- a/java/org/apache/jasper/compiler/Generator.java
+++ b/java/org/apache/jasper/compiler/Generator.java
@@ -1117,12 +1117,9 @@ class Generator {
          * a Named Attribute (&lt;jsp:attribute&gt;), generate the code to evaluate
          * those bodies first.
          * <p>
-         * If parent is null, simply returns.
+         * {@code parent} is assumed to be non-null
          */
         private void prepareParams(Node parent) throws JasperException {
-            if (parent == null)
-                return;
-
             Node.Nodes subelements = parent.getBody();
             if (subelements != null) {
                 for (int i = 0; i < subelements.size(); i++) {

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