tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1812087 - /tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java
Date Fri, 13 Oct 2017 09:11:47 GMT
Author: markt
Date: Fri Oct 13 09:11:47 2017
New Revision: 1812087

URL: http://svn.apache.org/viewvc?rev=1812087&view=rev
Log:
Fix SpotBugs warning
Better null handling

Modified:
    tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java?rev=1812087&r1=1812086&r2=1812087&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java Fri Oct 13 09:11:47
2017
@@ -257,8 +257,11 @@ public abstract class AbstractEndpoint<S
      * @return  The SSL host configuration that was removed, if any
      */
     public SSLHostConfig removeSslHostConfig(String hostName) {
+        if (hostName == null) {
+            return null;
+        }
         // Host names are case insensitive
-        if (hostName != null && hostName.equalsIgnoreCase(getDefaultSSLHostConfigName()))
{
+        if (hostName.equalsIgnoreCase(getDefaultSSLHostConfigName())) {
             throw new IllegalArgumentException(
                     sm.getString("endpoint.removeDefaultSslHostConfig", hostName));
         }



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message