Commit 37788d86 by 张乐 Committed by GitHub

Merge pull request #595 from nobodyiam/fix-coverity-bug

fix coverity bugs
parents b928d82e 996fc516
......@@ -7,6 +7,7 @@ import java.net.SocketException;
import java.net.UnknownHostException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Enumeration;
import java.util.List;
import java.util.Objects;
......@@ -96,7 +97,9 @@ public enum NetworkInterfaceManager {
}
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>();
InetAddress local = null;
......
......@@ -33,7 +33,7 @@ public class WebContextConfiguration {
@Override
public void onStartup(ServletContext servletContext) throws ServletException {
String loggingServerIP = portalConfig.cloggingUrl();
String loggingServerPort = portalConfig.cloggingUrl();
String loggingServerPort = portalConfig.cloggingPort();
String credisServiceUrl = portalConfig.credisServiceUrl();
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