< prev index next >

src/java.base/share/classes/java/net/InetAddress.java

Print this page
rev 55657 : 8227587: Add internal privileged System.loadLibrary
Reviewed-by: rriggs

*** 315,331 **** } else if (str.equalsIgnoreCase("system")) { preferIPv6Address = PREFER_SYSTEM_VALUE; } else { preferIPv6Address = PREFER_IPV4_VALUE; } ! AccessController.doPrivileged( ! new java.security.PrivilegedAction<>() { ! public Void run() { ! System.loadLibrary("net"); ! return null; ! } ! }); SharedSecrets.setJavaNetInetAddressAccess( new JavaNetInetAddressAccess() { public String getOriginalHostName(InetAddress ia) { return ia.holder.getOriginalHostName(); } --- 315,325 ---- } else if (str.equalsIgnoreCase("system")) { preferIPv6Address = PREFER_SYSTEM_VALUE; } else { preferIPv6Address = PREFER_IPV4_VALUE; } ! jdk.internal.access.SharedSecrets.getJavaLangAccess().loadLibrary("net"); SharedSecrets.setJavaNetInetAddressAccess( new JavaNetInetAddressAccess() { public String getOriginalHostName(InetAddress ia) { return ia.holder.getOriginalHostName(); }
< prev index next >