7013969: NetworkInterface.toString can reveal bindings
authorchegar
Fri, 18 Feb 2011 13:31:57 +0000
changeset 9828 9c9dd9a1b11b
parent 9827 add64ce324a8
child 9829 59c2c48a4b9e
7013969: NetworkInterface.toString can reveal bindings Reviewed-by: alanb, michaelm, hawtin
jdk/src/share/classes/java/net/NetworkInterface.java
--- a/jdk/src/share/classes/java/net/NetworkInterface.java	Thu Feb 17 12:21:49 2011 +0300
+++ b/jdk/src/share/classes/java/net/NetworkInterface.java	Fri Feb 18 13:31:57 2011 +0000
@@ -547,13 +547,8 @@
         if (displayName != null) {
             result += " (" + displayName + ")";
         }
-        result += " index: "+index+" addresses:\n";
-        for (Enumeration e = getInetAddresses(); e.hasMoreElements(); ) {
-            InetAddress addr = (InetAddress)e.nextElement();
-            result += addr+";\n";
-        }
         return result;
     }
+
     private static native void init();
-
 }