< prev index next >

src/java.base/windows/classes/sun/nio/fs/WindowsNativeDispatcher.java

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

@@ -23,12 +23,10 @@
  * questions.
  */
 
 package sun.nio.fs;
 
-import java.security.AccessController;
-import java.security.PrivilegedAction;
 import jdk.internal.misc.Unsafe;
 
 import static sun.nio.fs.WindowsConstants.*;
 
 /**

@@ -1151,16 +1149,12 @@
     // -- native library initialization --
 
     private static native void initIDs();
 
     static {
-        AccessController.doPrivileged(new PrivilegedAction<Void>() {
-            public Void run() {
                 // nio.dll has dependency on net.dll
-                System.loadLibrary("net");
-                System.loadLibrary("nio");
-                return null;
-        }});
+        jdk.internal.access.SharedSecrets.getJavaLangAccess().loadLibrary("net");
+        jdk.internal.access.SharedSecrets.getJavaLangAccess().loadLibrary("nio");
         initIDs();
     }
 
 }
< prev index next >