提交 996fc516 编写于 作者: J Jason Song

fix coverity bugs

上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册