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

remm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/main by this push:
     new 212734b600 Cleanup
212734b600 is described below

commit 212734b6003c8ae4cf79bc405d442299c0e1e1a6
Author: remm <r...@apache.org>
AuthorDate: Mon Sep 11 15:49:23 2023 +0200

    Cleanup
    
    Argument cannot be null, so remove check that triggered coverity.
---
 java/org/apache/catalina/servlets/CGIServlet.java | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/java/org/apache/catalina/servlets/CGIServlet.java 
b/java/org/apache/catalina/servlets/CGIServlet.java
index c4c967fd36..1c4a0d68ca 100644
--- a/java/org/apache/catalina/servlets/CGIServlet.java
+++ b/java/org/apache/catalina/servlets/CGIServlet.java
@@ -915,8 +915,7 @@ public final class CGIServlet extends HttpServlet {
             String name = null;
             String scriptname = null;
 
-            if (webAppRootDir != null &&
-                    webAppRootDir.lastIndexOf(File.separator) == 
(webAppRootDir.length() - 1)) {
+            if (webAppRootDir.lastIndexOf(File.separator) == 
(webAppRootDir.length() - 1)) {
                 //strip the trailing "/" from the webAppRootDir
                 webAppRootDir = webAppRootDir.substring(0, 
(webAppRootDir.length() - 1));
             }


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

Reply via email to