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

markt-asf 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 4720b383e8 Fix NPE if an attempt is made to remove an unknown host
4720b383e8 is described below

commit 4720b383e8fe8af19f796577ae8529c2f7a69320
Author: Mark Thomas <[email protected]>
AuthorDate: Sat May 16 07:34:42 2026 +0100

    Fix NPE if an attempt is made to remove an unknown host
---
 java/org/apache/tomcat/util/net/AbstractEndpoint.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to