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 <[email protected]>
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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to