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

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


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

commit 87e59b2de76cd8719717e6fce4a9a45d284c5875
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 69b9d69e5d..a0c1924ebb 100644
--- a/java/org/apache/tomcat/util/net/AbstractEndpoint.java
+++ b/java/org/apache/tomcat/util/net/AbstractEndpoint.java
@@ -444,7 +444,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