7013969: NetworkInterface.toString can reveal bindings
Reviewed-by: alanb, michaelm, hawtin
--- 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();
-
}