You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by re...@apache.org on 2026/05/15 09:35:13 UTC

(tomcat) branch 11.0.x updated: Avoid possible NPE

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

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


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

commit c4820824de2cd820af2b3e9696b9ed0a4005fa38
Author: remm <re...@apache.org>
AuthorDate: Fri May 15 11:08:24 2026 +0200

    Avoid possible NPE
    
    Calling with a non existing host config would be a user error, so this
    is cosmetic.
---
 java/org/apache/tomcat/util/net/AbstractEndpoint.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/tomcat/util/net/AbstractEndpoint.java b/java/org/apache/tomcat/util/net/AbstractEndpoint.java
index 3ff0759716..de07ec7f94 100644
--- a/java/org/apache/tomcat/util/net/AbstractEndpoint.java
+++ b/java/org/apache/tomcat/util/net/AbstractEndpoint.java
@@ -503,7 +503,9 @@ public abstract class AbstractEndpoint<S, U> {
             throw new IllegalArgumentException(sm.getString("endpoint.removeDefaultSslHostConfig", hostName));
         }
         SSLHostConfig sslHostConfig = sslHostConfigs.remove(hostNameLower);
-        unregisterJmx(sslHostConfig);
+        if (sslHostConfig == null) {
+            unregisterJmx(sslHostConfig);
+        }
         return sslHostConfig;
     }
 


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