< prev index next >

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

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

*** 1,7 **** /* ! * Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 2008, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 25,36 **** package sun.nio.fs; import java.nio.file.*; import java.io.IOException; - import java.security.AccessController; - import java.security.PrivilegedAction; /** * File type detector that does lookup of file extension using Windows Registry. */ --- 25,34 ----
*** 68,82 **** } private static native String queryStringValue(long subKey, long name); static { - AccessController.doPrivileged(new PrivilegedAction<Void>() { - @Override - public Void run() { // nio.dll has dependency on net.dll ! System.loadLibrary("net"); ! System.loadLibrary("nio"); ! return null; ! }}); } } --- 66,76 ---- } private static native String queryStringValue(long subKey, long name); static { // nio.dll has dependency on net.dll ! var jla = jdk.internal.access.SharedSecrets.getJavaLangAccess() ! jla.loadLibrary(RegistryFileTypeDetector.class, "net"); ! jla.loadLibrary(RegistryFileTypeDetector.class, "nio"); } }
< prev index next >