changeset 4425:f880242cb9c9

7076523: TEST_BUG: test/java/net/NetworkInterface/NetParamsTest.java can fail with NPE Reviewed-by: alanb
author chegar
date Wed, 10 Aug 2011 12:30:29 +0100
parents c0c52be4eaf1
children aef18086ebc9
files test/java/net/NetworkInterface/NetParamsTest.java
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/test/java/net/NetworkInterface/NetParamsTest.java	Fri Oct 28 19:08:07 2011 +0100
+++ b/test/java/net/NetworkInterface/NetParamsTest.java	Wed Aug 10 12:30:29 2011 +0100
@@ -45,7 +45,9 @@
         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());