提交 649a1fdc 编写于 作者: J Jason Song 提交者: GitHub

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

fix coverity bug
......@@ -98,12 +98,7 @@ public enum NetworkInterfaceManager {
try {
Enumeration<NetworkInterface> interfaces = NetworkInterface.getNetworkInterfaces();
List<NetworkInterface> nis;
if (interfaces == null) {
nis = Collections.emptyList();
} else {
nis = Collections.list(NetworkInterface.getNetworkInterfaces());
}
List<NetworkInterface> nis = interfaces == null ? Collections.<NetworkInterface>emptyList() : Collections.list(interfaces);
List<InetAddress> addresses = new ArrayList<InetAddress>();
InetAddress local = null;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册