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

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


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

commit b716f5665cfcf2e635d1efd226f4c16642d0e824
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 7ff11c489f..b145f2014a 100644
--- a/java/org/apache/tomcat/util/net/AbstractEndpoint.java
+++ b/java/org/apache/tomcat/util/net/AbstractEndpoint.java
@@ -430,7 +430,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