summaryrefslogtreecommitdiffstats
path: root/policy-endpoints/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'policy-endpoints/src/main/java')
-rw-r--r--policy-endpoints/src/main/java/org/onap/policy/common/endpoints/http/server/internal/JettyJerseyServer.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/http/server/internal/JettyJerseyServer.java b/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/http/server/internal/JettyJerseyServer.java
index 0aaf1ccb..78661a45 100644
--- a/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/http/server/internal/JettyJerseyServer.java
+++ b/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/http/server/internal/JettyJerseyServer.java
@@ -22,6 +22,7 @@ package org.onap.policy.common.endpoints.http.server.internal;
import io.swagger.jersey.config.JerseyJaxrsConfig;
import java.util.HashMap;
+import org.apache.commons.lang3.StringUtils;
import org.eclipse.jetty.servlet.ServletHolder;
import org.glassfish.jersey.server.ServerProperties;
import org.onap.policy.common.utils.network.NetworkUtil;
@@ -119,7 +120,7 @@ public class JettyJerseyServer extends JettyServletServer {
ServletHolder swaggerServlet = context.addServlet(JerseyJaxrsConfig.class, "/");
String hostname = this.connector.getHost();
- if (hostname == null || hostname.isEmpty() || hostname.equals(NetworkUtil.IPv4_WILDCARD_ADDRESS)) {
+ if (StringUtils.isBlank(hostname) || hostname.equals(NetworkUtil.IPV4_WILDCARD_ADDRESS)) {
hostname = NetworkUtil.getHostname();
}