diff options
author | Sven Gothel <[email protected]> | 2023-01-14 21:31:45 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2023-01-14 21:31:45 +0100 |
commit | 72a8be591d5daba1e4e231c386812c543d503fce (patch) | |
tree | b4a08e451741eab5a9cad4617e2151bdfd8f5223 /src/jogl/classes/com/jogamp | |
parent | 4dfe7369d8e58978dc56235344731f927a1c8ae4 (diff) |
Replace AccessController.doPrivileged() w/ SecurityUtil.doPrivileged()
Diffstat (limited to 'src/jogl/classes/com/jogamp')
3 files changed, 7 insertions, 7 deletions
diff --git a/src/jogl/classes/com/jogamp/graph/font/FontFactory.java b/src/jogl/classes/com/jogamp/graph/font/FontFactory.java index 76badcda8..5c317bd2b 100644 --- a/src/jogl/classes/com/jogamp/graph/font/FontFactory.java +++ b/src/jogl/classes/com/jogamp/graph/font/FontFactory.java @@ -32,13 +32,13 @@ import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; -import java.security.AccessController; import java.security.PrivilegedAction; import com.jogamp.common.net.Uri; import com.jogamp.common.util.IOUtil; import com.jogamp.common.util.PropertyAccess; import com.jogamp.common.util.ReflectionUtil; +import com.jogamp.common.util.SecurityUtil; import com.jogamp.common.util.cache.TempJarCache; import jogamp.graph.font.FontConstructor; @@ -141,7 +141,7 @@ public class FontFactory { final int[] streamLen = { 0 }; final File tempFile[] = { null }; - final InputStream bis = AccessController.doPrivileged(new PrivilegedAction<InputStream>() { + final InputStream bis = SecurityUtil.doPrivileged(new PrivilegedAction<InputStream>() { @Override public InputStream run() { InputStream bis = null; @@ -179,7 +179,7 @@ public class FontFactory { bis.close(); } if( null != tempFile[0] ) { - AccessController.doPrivileged(new PrivilegedAction<Object>() { + SecurityUtil.doPrivileged(new PrivilegedAction<Object>() { @Override public Object run() { tempFile[0].delete(); diff --git a/src/jogl/classes/com/jogamp/opengl/GLProfile.java b/src/jogl/classes/com/jogamp/opengl/GLProfile.java index 8612fc73f..27480cb53 100644 --- a/src/jogl/classes/com/jogamp/opengl/GLProfile.java +++ b/src/jogl/classes/com/jogamp/opengl/GLProfile.java @@ -48,6 +48,7 @@ import com.jogamp.common.jvm.JNILibLoaderBase; import com.jogamp.common.os.Platform; import com.jogamp.common.util.PropertyAccess; import com.jogamp.common.util.ReflectionUtil; +import com.jogamp.common.util.SecurityUtil; import com.jogamp.common.util.VersionUtil; import com.jogamp.common.util.cache.TempJarCache; import com.jogamp.common.util.locks.LockFactory; @@ -62,7 +63,6 @@ import com.jogamp.nativewindow.NativeWindowFactory; import com.jogamp.opengl.fixedfunc.GLPointerFunc; import java.lang.reflect.Constructor; -import java.security.AccessController; import java.security.PrivilegedAction; import java.util.HashMap; import java.util.List; @@ -222,7 +222,7 @@ public class GLProfile { // run the whole static initialization privileged to speed up, // since this skips checking further access - AccessController.doPrivileged(new PrivilegedAction<Object>() { + SecurityUtil.doPrivileged(new PrivilegedAction<Object>() { @Override public Object run() { Platform.initSingleton(); diff --git a/src/jogl/classes/com/jogamp/opengl/cg/CgDynamicLibraryBundleInfo.java b/src/jogl/classes/com/jogamp/opengl/cg/CgDynamicLibraryBundleInfo.java index 5e6338b5c..52b207b0c 100644 --- a/src/jogl/classes/com/jogamp/opengl/cg/CgDynamicLibraryBundleInfo.java +++ b/src/jogl/classes/com/jogamp/opengl/cg/CgDynamicLibraryBundleInfo.java @@ -33,16 +33,16 @@ import com.jogamp.common.os.DynamicLibraryBundle; import com.jogamp.common.os.DynamicLibraryBundleInfo; import com.jogamp.common.os.Platform; import com.jogamp.common.util.RunnableExecutor; +import com.jogamp.common.util.SecurityUtil; import com.jogamp.common.util.cache.TempJarCache; -import java.security.AccessController; import java.security.PrivilegedAction; import java.util.*; public final class CgDynamicLibraryBundleInfo implements DynamicLibraryBundleInfo { private static final List<String> glueLibNames; static { - AccessController.doPrivileged(new PrivilegedAction<Object>() { + SecurityUtil.doPrivileged(new PrivilegedAction<Object>() { @Override public Object run() { Platform.initSingleton(); |