提交 557da3e0 编写于 作者: C chegar

7076523: TEST_BUG: test/java/net/NetworkInterface/NetParamsTest.java can fail with NPE

Reviewed-by: alanb
上级 29ef622d
......@@ -45,7 +45,9 @@ public class NetParamsTest {
System.out.println("\tPoint to Point: " + netif.isPointToPoint());
System.out.println("\tVirtual: " + netif.isVirtual());
if (netif.isVirtual()) {
System.out.println("\tParent Interface: " + netif.getParent().getName());
NetworkInterface parent = netif.getParent();
String parentName = parent == null ? "null" : parent.getName();
System.out.println("\tParent Interface: " + parentName);
}
System.out.println("\tMulticast: " + netif.supportsMulticast());
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册