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

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


The following commit(s) were added to refs/heads/10.1.x by this push:
     new 0fafa69214 Avoid possible NPE
0fafa69214 is described below

commit 0fafa6921474d3485c171a54960438020b37ee2e
Author: remm <r...@apache.org>
AuthorDate: Thu Sep 14 16:52:01 2023 +0200

    Avoid possible NPE
    
    Found by coverity.
---
 java/org/apache/coyote/http11/upgrade/UpgradeProcessorExternal.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git 
a/java/org/apache/coyote/http11/upgrade/UpgradeProcessorExternal.java 
b/java/org/apache/coyote/http11/upgrade/UpgradeProcessorExternal.java
index dbf744e9c1..0c519bd488 100644
--- a/java/org/apache/coyote/http11/upgrade/UpgradeProcessorExternal.java
+++ b/java/org/apache/coyote/http11/upgrade/UpgradeProcessorExternal.java
@@ -43,7 +43,9 @@ public class UpgradeProcessorExternal extends 
UpgradeProcessorBase {
             UpgradeGroupInfo upgradeGroupInfo) {
         super(upgradeToken);
         this.upgradeInfo = new UpgradeInfo();
-        upgradeGroupInfo.addUpgradeInfo(upgradeInfo);
+        if (upgradeGroupInfo != null) {
+            upgradeGroupInfo.addUpgradeInfo(upgradeInfo);
+        }
         this.upgradeServletInputStream = new UpgradeServletInputStream(this, 
wrapper, upgradeInfo);
         this.upgradeServletOutputStream = new UpgradeServletOutputStream(this, 
wrapper, upgradeInfo);
 


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

Reply via email to