< prev index next >

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

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

*** 26,36 **** package java.net; import java.util.Arrays; import java.util.Enumeration; import java.util.NoSuchElementException; - import java.security.AccessController; import java.util.Spliterator; import java.util.Spliterators; import java.util.stream.Stream; import java.util.stream.StreamSupport; --- 26,35 ----
*** 55,71 **** private boolean virtual = false; private static final NetworkInterface defaultInterface; private static final int defaultIndex; /* index of defaultInterface */ static { ! AccessController.doPrivileged( ! new java.security.PrivilegedAction<>() { ! public Void run() { ! System.loadLibrary("net"); ! return null; ! } ! }); init(); defaultInterface = DefaultInterface.getDefault(); if (defaultInterface != null) { defaultIndex = defaultInterface.getIndex(); --- 54,64 ---- private boolean virtual = false; private static final NetworkInterface defaultInterface; private static final int defaultIndex; /* index of defaultInterface */ static { ! jdk.internal.access.SharedSecrets.getJavaLangAccess().loadLibrary("net"); init(); defaultInterface = DefaultInterface.getDefault(); if (defaultInterface != null) { defaultIndex = defaultInterface.getIndex();
< prev index next >