Commit 3996e646 by Jason Song

fix coverity bug

parent 36771bbf
...@@ -98,12 +98,7 @@ public enum NetworkInterfaceManager { ...@@ -98,12 +98,7 @@ public enum NetworkInterfaceManager {
try { try {
Enumeration<NetworkInterface> interfaces = NetworkInterface.getNetworkInterfaces(); Enumeration<NetworkInterface> interfaces = NetworkInterface.getNetworkInterfaces();
List<NetworkInterface> nis; List<NetworkInterface> nis = interfaces == null ? Collections.<NetworkInterface>emptyList() : Collections.list(interfaces);
if (interfaces == null) {
nis = Collections.emptyList();
} else {
nis = Collections.list(NetworkInterface.getNetworkInterfaces());
}
List<InetAddress> addresses = new ArrayList<InetAddress>(); List<InetAddress> addresses = new ArrayList<InetAddress>();
InetAddress local = null; InetAddress local = null;
......
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