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 3cf8b95731 Avoid possible NPE
3cf8b95731 is described below
commit 3cf8b95731704ad2102a9d0a9e454a6849019b65
Author: remm <[email protected]>
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: [email protected]
For additional commands, e-mail: [email protected]