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

rmaucher 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 47ab9df4b2 Avoid possible NPE
47ab9df4b2 is described below

commit 47ab9df4b21bc49dcd1082a816429e3ba351263d
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 e040ae6aef..777039b5e2 100644
--- a/java/org/apache/tomcat/util/net/AbstractEndpoint.java
+++ b/java/org/apache/tomcat/util/net/AbstractEndpoint.java
@@ -502,7 +502,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