Commit 996fc516 by Jason Song

fix coverity bugs

parent b928d82e
...@@ -7,6 +7,7 @@ import java.net.SocketException; ...@@ -7,6 +7,7 @@ import java.net.SocketException;
import java.net.UnknownHostException; import java.net.UnknownHostException;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
import java.util.Enumeration;
import java.util.List; import java.util.List;
import java.util.Objects; import java.util.Objects;
...@@ -96,7 +97,9 @@ public enum NetworkInterfaceManager { ...@@ -96,7 +97,9 @@ public enum NetworkInterfaceManager {
} }
try { try {
List<NetworkInterface> nis = Collections.list(NetworkInterface.getNetworkInterfaces()); Enumeration<NetworkInterface> interfaces = NetworkInterface.getNetworkInterfaces();
List<NetworkInterface> nis = interfaces == null ? Collections.<NetworkInterface>emptyList()
: Collections.list(NetworkInterface.getNetworkInterfaces());
List<InetAddress> addresses = new ArrayList<InetAddress>(); List<InetAddress> addresses = new ArrayList<InetAddress>();
InetAddress local = null; InetAddress local = null;
......
...@@ -33,7 +33,7 @@ public class WebContextConfiguration { ...@@ -33,7 +33,7 @@ public class WebContextConfiguration {
@Override @Override
public void onStartup(ServletContext servletContext) throws ServletException { public void onStartup(ServletContext servletContext) throws ServletException {
String loggingServerIP = portalConfig.cloggingUrl(); String loggingServerIP = portalConfig.cloggingUrl();
String loggingServerPort = portalConfig.cloggingUrl(); String loggingServerPort = portalConfig.cloggingPort();
String credisServiceUrl = portalConfig.credisServiceUrl(); String credisServiceUrl = portalConfig.credisServiceUrl();
servletContext.setInitParameter("loggingServerIP", servletContext.setInitParameter("loggingServerIP",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment