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:56:13 UTC

[tomcat] branch 8.5.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 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


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

commit d32f3ee4c964f73cf20bf01dbf05678250de88fb
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 a61efe6..ee44577 100644
--- a/java/org/apache/jasper/compiler/Generator.java
+++ b/java/org/apache/jasper/compiler/Generator.java
@@ -1100,12 +1100,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