From 72a8be591d5daba1e4e231c386812c543d503fce Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sat, 14 Jan 2023 21:31:45 +0100 Subject: Replace AccessController.doPrivileged() w/ SecurityUtil.doPrivileged() --- src/jogl/classes/com/jogamp/graph/font/FontFactory.java | 6 +++--- src/jogl/classes/com/jogamp/opengl/GLProfile.java | 4 ++-- .../com/jogamp/opengl/cg/CgDynamicLibraryBundleInfo.java | 4 ++-- src/jogl/classes/jogamp/graph/font/JavaFontLoader.java | 6 +++--- src/jogl/classes/jogamp/graph/font/UbuntuFontLoader.java | 6 +++--- src/jogl/classes/jogamp/opengl/Debug.java | 4 ++-- src/jogl/classes/jogamp/opengl/GLContextImpl.java | 11 ++++++----- src/jogl/classes/jogamp/opengl/GLDebugMessageHandler.java | 4 ++-- src/jogl/classes/jogamp/opengl/ThreadingImpl.java | 4 ++-- src/jogl/classes/jogamp/opengl/awt/Java2D.java | 4 ++-- .../opengl/util/av/impl/FFMPEGDynamicLibraryBundleInfo.java | 4 ++-- .../classes/jogamp/opengl/util/av/impl/FFMPEGMediaPlayer.java | 4 ++-- .../jogamp/opengl/windows/wgl/WindowsWGLDrawableFactory.java | 4 ++-- .../classes/jogamp/opengl/x11/glx/X11GLXDrawableFactory.java | 4 ++-- .../classes/com/jogamp/nativewindow/NativeWindowFactory.java | 6 +++--- .../classes/com/jogamp/nativewindow/awt/AppContextInfo.java | 4 ++-- .../classes/com/jogamp/nativewindow/javafx/JFXAccessor.java | 5 +++-- .../classes/com/jogamp/nativewindow/swt/SWTAccessor.java | 4 ++-- .../classes/jogamp/nativewindow/BcmVCArtifacts.java | 5 +++-- src/nativewindow/classes/jogamp/nativewindow/Debug.java | 4 ++-- .../classes/jogamp/nativewindow/NWJNILibLoader.java | 4 ++-- .../classes/jogamp/nativewindow/jawt/JAWTJNILibLoader.java | 4 ++-- .../classes/jogamp/nativewindow/jawt/JAWTUtil.java | 6 +++--- .../jogamp/nativewindow/jawt/macosx/MacOSXJAWTWindow.java | 4 ++-- .../nativewindow/jawt/windows/Win32SunJDKReflection.java | 4 ++-- .../jogamp/nativewindow/jawt/x11/X11SunJDKReflection.java | 4 ++-- .../classes/jogamp/nativewindow/macosx/OSXUtil.java | 4 ++-- src/newt/classes/com/jogamp/newt/NewtFactory.java | 4 ++-- src/newt/classes/com/jogamp/newt/opengl/GLWindow.java | 4 ++-- .../com/jogamp/newt/util/applet/JOGLNewtAppletBase.java | 7 ++++--- src/newt/classes/jogamp/newt/Debug.java | 4 ++-- src/newt/classes/jogamp/newt/NEWTJNILibLoader.java | 6 +++--- .../com/jogamp/oculusvr/OVRDynamicLibraryBundleInfo.java | 4 ++-- 33 files changed, 80 insertions(+), 76 deletions(-) (limited to 'src') 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() { + final InputStream bis = SecurityUtil.doPrivileged(new PrivilegedAction() { @Override public InputStream run() { InputStream bis = null; @@ -179,7 +179,7 @@ public class FontFactory { bis.close(); } if( null != tempFile[0] ) { - AccessController.doPrivileged(new PrivilegedAction() { + SecurityUtil.doPrivileged(new PrivilegedAction() { @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() { + SecurityUtil.doPrivileged(new PrivilegedAction() { @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 glueLibNames; static { - AccessController.doPrivileged(new PrivilegedAction() { + SecurityUtil.doPrivileged(new PrivilegedAction() { @Override public Object run() { Platform.initSingleton(); diff --git a/src/jogl/classes/jogamp/graph/font/JavaFontLoader.java b/src/jogl/classes/jogamp/graph/font/JavaFontLoader.java index 68586dfc5..36d35cde9 100644 --- a/src/jogl/classes/jogamp/graph/font/JavaFontLoader.java +++ b/src/jogl/classes/jogamp/graph/font/JavaFontLoader.java @@ -32,12 +32,12 @@ 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.opengl.GLException; import com.jogamp.common.util.IntObjectHashMap; +import com.jogamp.common.util.SecurityUtil; import com.jogamp.graph.font.Font; import com.jogamp.graph.font.FontSet; import com.jogamp.graph.font.FontFactory; @@ -68,7 +68,7 @@ public class JavaFontLoader implements FontSet { final String javaFontPath; private JavaFontLoader() { - final String javaHome = AccessController.doPrivileged(new PrivilegedAction() { + final String javaHome = SecurityUtil.doPrivileged(new PrivilegedAction() { @Override public String run() { return System.getProperty("java.home"); @@ -158,7 +158,7 @@ public class JavaFontLoader implements FontSet { private Font abspathImpl(final String fname, final int family, final int style) throws IOException { final Exception[] privErr = { null }; final int[] streamLen = { 0 }; - final InputStream stream = AccessController.doPrivileged(new PrivilegedAction() { + final InputStream stream = SecurityUtil.doPrivileged(new PrivilegedAction() { @Override public InputStream run() { try { diff --git a/src/jogl/classes/jogamp/graph/font/UbuntuFontLoader.java b/src/jogl/classes/jogamp/graph/font/UbuntuFontLoader.java index 78140df6f..71d18b17e 100644 --- a/src/jogl/classes/jogamp/graph/font/UbuntuFontLoader.java +++ b/src/jogl/classes/jogamp/graph/font/UbuntuFontLoader.java @@ -36,12 +36,12 @@ import com.jogamp.common.os.Platform; import com.jogamp.common.util.IOUtil; import com.jogamp.common.util.IntObjectHashMap; import com.jogamp.common.util.JarUtil; +import com.jogamp.common.util.SecurityUtil; import com.jogamp.common.util.cache.TempJarCache; import com.jogamp.graph.font.Font; import com.jogamp.graph.font.FontSet; import com.jogamp.graph.font.FontFactory; -import java.security.AccessController; import java.security.PrivilegedAction; public class UbuntuFontLoader implements FontSet { @@ -139,7 +139,7 @@ public class UbuntuFontLoader implements FontSet { if( TempJarCache.isInitialized(false) ) { try { final Uri uri = JarUtil.getRelativeOf(UbuntuFontLoader.class, jarSubDir, jarName); - final Exception e0 = AccessController.doPrivileged(new PrivilegedAction() { + final Exception e0 = SecurityUtil.doPrivileged(new PrivilegedAction() { @Override public Exception run() { try { @@ -173,7 +173,7 @@ public class UbuntuFontLoader implements FontSet { final InputStream stream; if( useTempJARCache ) { final Exception[] privErr = { null }; - stream = AccessController.doPrivileged(new PrivilegedAction() { + stream = SecurityUtil.doPrivileged(new PrivilegedAction() { @Override public InputStream run() { try { diff --git a/src/jogl/classes/jogamp/opengl/Debug.java b/src/jogl/classes/jogamp/opengl/Debug.java index 5273eead7..cc239fefc 100644 --- a/src/jogl/classes/jogamp/opengl/Debug.java +++ b/src/jogl/classes/jogamp/opengl/Debug.java @@ -28,10 +28,10 @@ package jogamp.opengl; -import java.security.AccessController; import java.security.PrivilegedAction; import com.jogamp.common.util.PropertyAccess; +import com.jogamp.common.util.SecurityUtil; /** Helper routines for logging and debugging. */ @@ -41,7 +41,7 @@ public class Debug extends PropertyAccess { private static final boolean debugAll; static { - AccessController.doPrivileged(new PrivilegedAction() { + SecurityUtil.doPrivileged(new PrivilegedAction() { @Override public Object run() { PropertyAccess.addTrustedPrefix("jogl."); diff --git a/src/jogl/classes/jogamp/opengl/GLContextImpl.java b/src/jogl/classes/jogamp/opengl/GLContextImpl.java index 68c21b84c..6baae35f9 100644 --- a/src/jogl/classes/jogamp/opengl/GLContextImpl.java +++ b/src/jogl/classes/jogamp/opengl/GLContextImpl.java @@ -42,7 +42,6 @@ package jogamp.opengl; import java.lang.reflect.Method; import java.nio.IntBuffer; -import java.security.AccessController; import java.security.PrivilegedAction; import java.util.HashMap; import java.util.IdentityHashMap; @@ -55,6 +54,7 @@ import com.jogamp.common.os.DynamicLookupHelper; import com.jogamp.common.os.Platform; import com.jogamp.common.util.Bitfield; import com.jogamp.common.util.ReflectionUtil; +import com.jogamp.common.util.SecurityUtil; import com.jogamp.common.util.VersionNumber; import com.jogamp.common.util.VersionNumberString; import com.jogamp.common.util.locks.RecursiveLock; @@ -1022,7 +1022,8 @@ public abstract class GLContextImpl extends GLContext { this.preCtxVersion = preCtxVersion; this.preCtxOptions = preCtxOptions; } - public final String toString() { + @Override + public final String toString() { return toString(new StringBuilder(), -1, -1, -1, -1).toString(); } public final StringBuilder toString(final StringBuilder sb, final int minMajor, final int minMinor, final int maxMajor, final int maxMinor) { @@ -1621,7 +1622,7 @@ public abstract class GLContextImpl extends GLContext { GLEmitter by looking up anew all of its function pointers using the given {@link GLDynamicLookupHelper}. */ protected final void resetProcAddressTable(final ProcAddressTable table, final GLDynamicLookupHelper dlh) { - AccessController.doPrivileged(new PrivilegedAction() { + SecurityUtil.doPrivileged(new PrivilegedAction() { @Override public Object run() { table.reset( dlh ); @@ -1777,7 +1778,7 @@ public abstract class GLContextImpl extends GLContext { final AbstractGraphicsDevice adevice = aconfig.getScreen().getDevice(); if( !glGetPtrInit ) { - AccessController.doPrivileged(new PrivilegedAction() { + SecurityUtil.doPrivileged(new PrivilegedAction() { @Override public Object run() { final GLDynamicLookupHelper glDynLookupHelper = getGLDynamicLookupHelper(reqMajor, reqCtxProfileBits); @@ -2665,7 +2666,7 @@ public abstract class GLContextImpl extends GLContext { throw new GLException("No GLDynamicLookupHelper for "+this); } final String tmpBase = GLNameResolver.normalizeVEN(GLNameResolver.normalizeARB(glFunctionName, true), true); - return AccessController.doPrivileged(new PrivilegedAction() { + return SecurityUtil.doPrivileged(new PrivilegedAction() { @Override public Boolean run() { boolean res = false; diff --git a/src/jogl/classes/jogamp/opengl/GLDebugMessageHandler.java b/src/jogl/classes/jogamp/opengl/GLDebugMessageHandler.java index fb4529da4..410ad46e8 100644 --- a/src/jogl/classes/jogamp/opengl/GLDebugMessageHandler.java +++ b/src/jogl/classes/jogamp/opengl/GLDebugMessageHandler.java @@ -27,7 +27,6 @@ */ package jogamp.opengl; -import java.security.AccessController; import java.security.PrivilegedAction; import java.util.ArrayList; @@ -41,6 +40,7 @@ import jogamp.common.os.PlatformPropsImpl; import com.jogamp.common.ExceptionUtils; import com.jogamp.common.os.Platform; +import com.jogamp.common.util.SecurityUtil; import com.jogamp.gluegen.runtime.ProcAddressTable; import com.jogamp.opengl.GLExtensions; @@ -114,7 +114,7 @@ public class GLDebugMessageHandler { } private final long getAddressFor(final ProcAddressTable table, final String functionName) { - return AccessController.doPrivileged(new PrivilegedAction() { + return SecurityUtil.doPrivileged(new PrivilegedAction() { @Override public Long run() { try { diff --git a/src/jogl/classes/jogamp/opengl/ThreadingImpl.java b/src/jogl/classes/jogamp/opengl/ThreadingImpl.java index 8545f10bf..e65e79b63 100644 --- a/src/jogl/classes/jogamp/opengl/ThreadingImpl.java +++ b/src/jogl/classes/jogamp/opengl/ThreadingImpl.java @@ -35,7 +35,6 @@ package jogamp.opengl; import java.lang.reflect.InvocationTargetException; -import java.security.AccessController; import java.security.PrivilegedAction; import com.jogamp.nativewindow.NativeWindowFactory; @@ -46,6 +45,7 @@ import com.jogamp.opengl.Threading.Mode; import com.jogamp.common.JogampRuntimeException; import com.jogamp.common.util.PropertyAccess; import com.jogamp.common.util.ReflectionUtil; +import com.jogamp.common.util.SecurityUtil; /** Implementation of the {@link com.jogamp.opengl.Threading} class. */ @@ -63,7 +63,7 @@ public class ThreadingImpl { static { threadingPlugin = - AccessController.doPrivileged(new PrivilegedAction() { + SecurityUtil.doPrivileged(new PrivilegedAction() { @Override public ToolkitThreadingPlugin run() { final String singleThreadProp; diff --git a/src/jogl/classes/jogamp/opengl/awt/Java2D.java b/src/jogl/classes/jogamp/opengl/awt/Java2D.java index 7f6c48ee2..8fb45a3a0 100644 --- a/src/jogl/classes/jogamp/opengl/awt/Java2D.java +++ b/src/jogl/classes/jogamp/opengl/awt/Java2D.java @@ -48,7 +48,6 @@ import java.awt.Rectangle; import java.lang.reflect.Field; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; -import java.security.AccessController; import java.security.PrivilegedAction; import com.jogamp.opengl.GL; @@ -58,6 +57,7 @@ import com.jogamp.opengl.GLException; import com.jogamp.opengl.GLProfile; import com.jogamp.common.os.Platform; +import com.jogamp.common.util.SecurityUtil; import jogamp.common.os.PlatformPropsImpl; import jogamp.opengl.Debug; @@ -118,7 +118,7 @@ public class Java2D { private static Method destroyOGLContextMethod; static { - AccessController.doPrivileged(new PrivilegedAction() { + SecurityUtil.doPrivileged(new PrivilegedAction() { @Override public Object run() { if (DEBUG) { diff --git a/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGDynamicLibraryBundleInfo.java b/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGDynamicLibraryBundleInfo.java index e42cc7af9..f1049ce6e 100644 --- a/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGDynamicLibraryBundleInfo.java +++ b/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGDynamicLibraryBundleInfo.java @@ -28,7 +28,6 @@ package jogamp.opengl.util.av.impl; -import java.security.AccessController; import java.security.PrivilegedAction; import java.util.ArrayList; import java.util.Arrays; @@ -41,6 +40,7 @@ import com.jogamp.common.ExceptionUtils; import com.jogamp.common.os.DynamicLibraryBundle; import com.jogamp.common.os.DynamicLibraryBundleInfo; import com.jogamp.common.util.RunnableExecutor; +import com.jogamp.common.util.SecurityUtil; import com.jogamp.common.util.VersionNumber; /** @@ -217,7 +217,7 @@ class FFMPEGDynamicLibraryBundleInfo implements DynamicLibraryBundleInfo { throw new InternalError("XXX0 "+symbolNames.length+" != "+symbolCount); } - final DynamicLibraryBundle dl = AccessController.doPrivileged(privInitSymbolsAction); + final DynamicLibraryBundle dl = SecurityUtil.doPrivileged(privInitSymbolsAction); if( null == dl ) { return false; } diff --git a/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGMediaPlayer.java b/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGMediaPlayer.java index 74103fe31..6e44dcc37 100644 --- a/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGMediaPlayer.java +++ b/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGMediaPlayer.java @@ -30,7 +30,6 @@ package jogamp.opengl.util.av.impl; import java.io.IOException; import java.nio.ByteBuffer; -import java.security.AccessController; import java.security.PrivilegedAction; import com.jogamp.opengl.GL; @@ -39,6 +38,7 @@ import com.jogamp.opengl.GLException; import com.jogamp.common.util.IOUtil; import com.jogamp.common.util.PropertyAccess; +import com.jogamp.common.util.SecurityUtil; import com.jogamp.common.util.VersionNumber; import com.jogamp.gluegen.runtime.ProcAddressTable; import com.jogamp.opengl.util.TimeFrameI; @@ -422,7 +422,7 @@ public class FFMPEGMediaPlayer extends GLMediaPlayerImpl { final int audioQueueLimit; if( null != gl && STREAM_ID_NONE != getVID() ) { final GLContextImpl ctx = (GLContextImpl)gl.getContext(); - AccessController.doPrivileged(new PrivilegedAction() { + SecurityUtil.doPrivileged(new PrivilegedAction() { @Override public Object run() { final ProcAddressTable pt = ctx.getGLProcAddressTable(); diff --git a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDrawableFactory.java b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDrawableFactory.java index 652184e7e..d65027f0d 100644 --- a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDrawableFactory.java +++ b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDrawableFactory.java @@ -42,7 +42,6 @@ package jogamp.opengl.windows.wgl; import java.nio.Buffer; import java.nio.ShortBuffer; -import java.security.AccessController; import java.security.PrivilegedAction; import java.util.List; @@ -78,6 +77,7 @@ import jogamp.opengl.SharedResourceRunner; import com.jogamp.common.nio.PointerBuffer; import com.jogamp.common.util.PropertyAccess; import com.jogamp.common.util.ReflectionUtil; +import com.jogamp.common.util.SecurityUtil; import com.jogamp.nativewindow.GenericUpstreamSurfacelessHook; import com.jogamp.nativewindow.windows.WindowsGraphicsDevice; import com.jogamp.opengl.GLExtensions; @@ -155,7 +155,7 @@ public class WindowsWGLDrawableFactory extends GLDrawableFactoryImpl { synchronized(WindowsWGLDrawableFactory.class) { if( null == windowsWGLDynamicLookupHelper ) { - windowsWGLDynamicLookupHelper = AccessController.doPrivileged(new PrivilegedAction() { + windowsWGLDynamicLookupHelper = SecurityUtil.doPrivileged(new PrivilegedAction() { @Override public DesktopGLDynamicLookupHelper run() { DesktopGLDynamicLookupHelper tmp; diff --git a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXDrawableFactory.java b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXDrawableFactory.java index a03ce1641..85482679b 100644 --- a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXDrawableFactory.java +++ b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXDrawableFactory.java @@ -39,7 +39,6 @@ package jogamp.opengl.x11.glx; import java.nio.Buffer; import java.nio.ShortBuffer; -import java.security.AccessController; import java.security.PrivilegedAction; import java.util.List; @@ -72,6 +71,7 @@ import jogamp.opengl.SharedResourceRunner; import com.jogamp.common.ExceptionUtils; import com.jogamp.common.nio.Buffers; +import com.jogamp.common.util.SecurityUtil; import com.jogamp.common.util.VersionNumber; import com.jogamp.nativewindow.GenericUpstreamSurfacelessHook; import com.jogamp.nativewindow.x11.X11GraphicsDevice; @@ -96,7 +96,7 @@ public class X11GLXDrawableFactory extends GLDrawableFactoryImpl { synchronized(X11GLXDrawableFactory.class) { if( null == x11GLXDynamicLookupHelper ) { - x11GLXDynamicLookupHelper = AccessController.doPrivileged(new PrivilegedAction() { + x11GLXDynamicLookupHelper = SecurityUtil.doPrivileged(new PrivilegedAction() { @Override public DesktopGLDynamicLookupHelper run() { DesktopGLDynamicLookupHelper tmp; diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/NativeWindowFactory.java b/src/nativewindow/classes/com/jogamp/nativewindow/NativeWindowFactory.java index bedf15c7b..68ab36ed5 100644 --- a/src/nativewindow/classes/com/jogamp/nativewindow/NativeWindowFactory.java +++ b/src/nativewindow/classes/com/jogamp/nativewindow/NativeWindowFactory.java @@ -35,7 +35,6 @@ package com.jogamp.nativewindow; import java.io.File; import java.lang.reflect.Method; -import java.security.AccessController; import java.security.PrivilegedAction; import java.util.ArrayList; import java.util.Collections; @@ -61,6 +60,7 @@ import com.jogamp.common.os.Platform; import com.jogamp.common.util.InterruptSource; import com.jogamp.common.util.PropertyAccess; import com.jogamp.common.util.ReflectionUtil; +import com.jogamp.common.util.SecurityUtil; import com.jogamp.nativewindow.UpstreamWindowHookMutableSizePos; import com.jogamp.nativewindow.awt.AWTGraphicsDevice; import com.jogamp.nativewindow.awt.AWTGraphicsScreen; @@ -233,7 +233,7 @@ public abstract class NativeWindowFactory { final String[] _tmp = new String[] { null }; final String[] _nativeWindowingTypeNative = new String[] { null }; - AccessController.doPrivileged(new PrivilegedAction() { + SecurityUtil.doPrivileged(new PrivilegedAction() { @Override public Object run() { Platform.initSingleton(); // last resort .. @@ -398,7 +398,7 @@ public abstract class NativeWindowFactory { if( Platform.AWT_AVAILABLE && ReflectionUtil.isClassAvailable("com.jogamp.nativewindow.awt.AWTGraphicsDevice", cl) ) { - final Method[] jawtUtilMethods = AccessController.doPrivileged(new PrivilegedAction() { + final Method[] jawtUtilMethods = SecurityUtil.doPrivileged(new PrivilegedAction() { @Override public Method[] run() { try { diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/awt/AppContextInfo.java b/src/nativewindow/classes/com/jogamp/nativewindow/awt/AppContextInfo.java index 8189f6262..4fe2d6cd8 100644 --- a/src/nativewindow/classes/com/jogamp/nativewindow/awt/AppContextInfo.java +++ b/src/nativewindow/classes/com/jogamp/nativewindow/awt/AppContextInfo.java @@ -2,11 +2,11 @@ package com.jogamp.nativewindow.awt; import java.lang.ref.WeakReference; import java.lang.reflect.Method; -import java.security.AccessController; import java.security.PrivilegedAction; import com.jogamp.common.ExceptionUtils; import com.jogamp.common.util.RunnableTask; +import com.jogamp.common.util.SecurityUtil; import com.jogamp.common.util.UnsafeUtil; import jogamp.nativewindow.jawt.JAWTUtil; @@ -28,7 +28,7 @@ public class AppContextInfo { static { DEBUG = JAWTUtil.DEBUG; final Method[] _getAppContextMethod = { null }; - AccessController.doPrivileged(new PrivilegedAction() { + SecurityUtil.doPrivileged(new PrivilegedAction() { @Override public Object run() { return UnsafeUtil.doWithoutIllegalAccessLogger(new PrivilegedAction() { diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/javafx/JFXAccessor.java b/src/nativewindow/classes/com/jogamp/nativewindow/javafx/JFXAccessor.java index 9d38b1f4b..61358c56a 100644 --- a/src/nativewindow/classes/com/jogamp/nativewindow/javafx/JFXAccessor.java +++ b/src/nativewindow/classes/com/jogamp/nativewindow/javafx/JFXAccessor.java @@ -28,7 +28,6 @@ package com.jogamp.nativewindow.javafx; import java.lang.reflect.Method; -import java.security.AccessController; import java.security.PrivilegedAction; import com.jogamp.nativewindow.AbstractGraphicsDevice; @@ -43,6 +42,7 @@ import com.jogamp.common.ExceptionUtils; import com.jogamp.common.util.InterruptedRuntimeException; import com.jogamp.common.util.ReflectionUtil; import com.jogamp.common.util.RunnableTask; +import com.jogamp.common.util.SecurityUtil; import com.sun.javafx.tk.TKStage; import javafx.application.Platform; @@ -69,7 +69,7 @@ public class JFXAccessor { static { final boolean[] _DEBUG = new boolean[] { true }; - final Method[] res = AccessController.doPrivileged(new PrivilegedAction() { + final Method[] res = SecurityUtil.doPrivileged(new PrivilegedAction() { @Override public Method[] run() { NativeWindowFactory.initSingleton(); // last resort .. @@ -270,6 +270,7 @@ public class JFXAccessor { public static long getWindowHandle(final Window stageWindow) throws NativeWindowException { final long h[] = { 0 }; runOnJFXThread(true, new Runnable() { + @Override public void run() { try { final TKStage tkStage = (TKStage) tkStageGetter.invoke(stageWindow); diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/swt/SWTAccessor.java b/src/nativewindow/classes/com/jogamp/nativewindow/swt/SWTAccessor.java index 7f4a94c5b..1ddf14b82 100644 --- a/src/nativewindow/classes/com/jogamp/nativewindow/swt/SWTAccessor.java +++ b/src/nativewindow/classes/com/jogamp/nativewindow/swt/SWTAccessor.java @@ -32,7 +32,6 @@ import com.jogamp.common.os.Platform; import java.io.PrintStream; import java.lang.reflect.Field; import java.lang.reflect.Method; -import java.security.AccessController; import java.security.PrivilegedAction; import org.eclipse.swt.SWT; @@ -50,6 +49,7 @@ import com.jogamp.nativewindow.AbstractGraphicsDevice; import com.jogamp.nativewindow.NativeWindowFactory; import com.jogamp.nativewindow.VisualIDHolder; import com.jogamp.common.util.ReflectionUtil; +import com.jogamp.common.util.SecurityUtil; import com.jogamp.common.util.VersionNumber; import com.jogamp.nativewindow.macosx.MacOSXGraphicsDevice; import com.jogamp.nativewindow.windows.WindowsGraphicsDevice; @@ -138,7 +138,7 @@ public class SWTAccessor { } static { - AccessController.doPrivileged(new PrivilegedAction() { + SecurityUtil.doPrivileged(new PrivilegedAction() { @Override public Object run() { NativeWindowFactory.initSingleton(); // last resort .. diff --git a/src/nativewindow/classes/jogamp/nativewindow/BcmVCArtifacts.java b/src/nativewindow/classes/jogamp/nativewindow/BcmVCArtifacts.java index 0fc0665bc..a6be62e4e 100644 --- a/src/nativewindow/classes/jogamp/nativewindow/BcmVCArtifacts.java +++ b/src/nativewindow/classes/jogamp/nativewindow/BcmVCArtifacts.java @@ -29,9 +29,10 @@ package jogamp.nativewindow; import java.io.File; -import java.security.AccessController; import java.security.PrivilegedAction; +import com.jogamp.common.util.SecurityUtil; + /** * Heuristics about Broadcom (BCM) VideoCore (VC) existence and usage */ @@ -48,7 +49,7 @@ public class BcmVCArtifacts { final File driCard0Location = new File( "/dev/dri/card0"); final boolean[] res = new boolean [3]; - AccessController.doPrivileged(new PrivilegedAction() { + SecurityUtil.doPrivileged(new PrivilegedAction() { @Override public Object run() { res[0] = vcLibLocation.isFile(); diff --git a/src/nativewindow/classes/jogamp/nativewindow/Debug.java b/src/nativewindow/classes/jogamp/nativewindow/Debug.java index 8d8fd0667..9ccb5b3a5 100644 --- a/src/nativewindow/classes/jogamp/nativewindow/Debug.java +++ b/src/nativewindow/classes/jogamp/nativewindow/Debug.java @@ -28,10 +28,10 @@ package jogamp.nativewindow; -import java.security.AccessController; import java.security.PrivilegedAction; import com.jogamp.common.util.PropertyAccess; +import com.jogamp.common.util.SecurityUtil; /** Helper routines for logging and debugging. */ @@ -41,7 +41,7 @@ public class Debug extends PropertyAccess { private static final boolean debugAll; static { - AccessController.doPrivileged(new PrivilegedAction() { + SecurityUtil.doPrivileged(new PrivilegedAction() { @Override public Object run() { PropertyAccess.addTrustedPrefix("nativewindow."); diff --git a/src/nativewindow/classes/jogamp/nativewindow/NWJNILibLoader.java b/src/nativewindow/classes/jogamp/nativewindow/NWJNILibLoader.java index 1284974bf..7d530dda6 100644 --- a/src/nativewindow/classes/jogamp/nativewindow/NWJNILibLoader.java +++ b/src/nativewindow/classes/jogamp/nativewindow/NWJNILibLoader.java @@ -29,16 +29,16 @@ package jogamp.nativewindow; -import java.security.AccessController; import java.security.PrivilegedAction; import com.jogamp.common.jvm.JNILibLoaderBase; import com.jogamp.common.os.Platform; +import com.jogamp.common.util.SecurityUtil; import com.jogamp.common.util.cache.TempJarCache; public class NWJNILibLoader extends JNILibLoaderBase { public static boolean loadNativeWindow(final String ossuffix) { - return AccessController.doPrivileged(new PrivilegedAction() { + return SecurityUtil.doPrivileged(new PrivilegedAction() { @Override public Boolean run() { Platform.initSingleton(); diff --git a/src/nativewindow/classes/jogamp/nativewindow/jawt/JAWTJNILibLoader.java b/src/nativewindow/classes/jogamp/nativewindow/jawt/JAWTJNILibLoader.java index fe83ebc76..04585e4ca 100644 --- a/src/nativewindow/classes/jogamp/nativewindow/jawt/JAWTJNILibLoader.java +++ b/src/nativewindow/classes/jogamp/nativewindow/jawt/JAWTJNILibLoader.java @@ -39,17 +39,17 @@ package jogamp.nativewindow.jawt; +import com.jogamp.common.util.SecurityUtil; import com.jogamp.nativewindow.NativeWindowFactory; import jogamp.nativewindow.NWJNILibLoader; import java.awt.Toolkit; -import java.security.AccessController; import java.security.PrivilegedAction; public class JAWTJNILibLoader extends NWJNILibLoader { static { - AccessController.doPrivileged(new PrivilegedAction() { + SecurityUtil.doPrivileged(new PrivilegedAction() { @Override public Object run() { // Make sure that awt.dll is loaded before loading jawt.dll. Otherwise diff --git a/src/nativewindow/classes/jogamp/nativewindow/jawt/JAWTUtil.java b/src/nativewindow/classes/jogamp/nativewindow/jawt/JAWTUtil.java index f4e55cd47..bb18910fc 100644 --- a/src/nativewindow/classes/jogamp/nativewindow/jawt/JAWTUtil.java +++ b/src/nativewindow/classes/jogamp/nativewindow/jawt/JAWTUtil.java @@ -45,7 +45,6 @@ import java.awt.Toolkit; import java.awt.geom.AffineTransform; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; -import java.security.AccessController; import java.security.PrivilegedAction; import java.util.ArrayList; import java.util.Map; @@ -67,6 +66,7 @@ import jogamp.nativewindow.x11.X11Lib; import com.jogamp.common.ExceptionUtils; import com.jogamp.common.os.Platform; import com.jogamp.common.util.PropertyAccess; +import com.jogamp.common.util.SecurityUtil; import com.jogamp.common.util.UnsafeUtil; import com.jogamp.common.util.VersionNumber; import com.jogamp.common.util.locks.LockFactory; @@ -362,7 +362,7 @@ public class JAWTUtil { // Always enforce using sun.awt.SunToolkit's awtLock even on JVM >= Java_9, // as we have no other official means to synchronize native UI locks especially for X11 { - final SunToolkitData std = AccessController.doPrivileged(new PrivilegedAction() { + final SunToolkitData std = SecurityUtil.doPrivileged(new PrivilegedAction() { @Override public SunToolkitData run() { return UnsafeUtil.doWithoutIllegalAccessLogger(new PrivilegedAction() { @@ -407,7 +407,7 @@ public class JAWTUtil { gdGetScaleFactorMID = null; gdGetCGDisplayIDMIDOnOSX = null; } else { - final GraphicsDeviceData gdd = (GraphicsDeviceData) AccessController.doPrivileged(new PrivilegedAction() { + final GraphicsDeviceData gdd = (GraphicsDeviceData) SecurityUtil.doPrivileged(new PrivilegedAction() { @Override public Object run() { final GraphicsDeviceData d = new GraphicsDeviceData(); diff --git a/src/nativewindow/classes/jogamp/nativewindow/jawt/macosx/MacOSXJAWTWindow.java b/src/nativewindow/classes/jogamp/nativewindow/jawt/macosx/MacOSXJAWTWindow.java index f67cc7189..4e89709f2 100644 --- a/src/nativewindow/classes/jogamp/nativewindow/jawt/macosx/MacOSXJAWTWindow.java +++ b/src/nativewindow/classes/jogamp/nativewindow/jawt/macosx/MacOSXJAWTWindow.java @@ -43,7 +43,6 @@ package jogamp.nativewindow.jawt.macosx; import java.awt.Component; import java.awt.GraphicsConfiguration; import java.nio.Buffer; -import java.security.AccessController; import java.security.PrivilegedAction; import com.jogamp.nativewindow.AbstractGraphicsConfiguration; @@ -54,6 +53,7 @@ import com.jogamp.nativewindow.MutableSurface; import com.jogamp.nativewindow.util.Point; import com.jogamp.common.util.PropertyAccess; +import com.jogamp.common.util.SecurityUtil; import com.jogamp.nativewindow.awt.JAWTWindow; import jogamp.nativewindow.Debug; @@ -272,7 +272,7 @@ public class MacOSXJAWTWindow extends JAWTWindow implements MutableSurface { ret = NativeSurface.LOCK_SURFACE_CHANGED; } if (firstLock) { - AccessController.doPrivileged(new PrivilegedAction() { + SecurityUtil.doPrivileged(new PrivilegedAction() { @Override public Object run() { dsi = ds.GetDrawingSurfaceInfo(); diff --git a/src/nativewindow/classes/jogamp/nativewindow/jawt/windows/Win32SunJDKReflection.java b/src/nativewindow/classes/jogamp/nativewindow/jawt/windows/Win32SunJDKReflection.java index 55aaf90d2..54f34375d 100644 --- a/src/nativewindow/classes/jogamp/nativewindow/jawt/windows/Win32SunJDKReflection.java +++ b/src/nativewindow/classes/jogamp/nativewindow/jawt/windows/Win32SunJDKReflection.java @@ -44,10 +44,10 @@ import java.awt.GraphicsConfiguration; import java.awt.GraphicsDevice; import java.lang.reflect.Method; -import java.security.AccessController; import java.security.PrivilegedAction; import com.jogamp.common.ExceptionUtils; +import com.jogamp.common.util.SecurityUtil; import com.jogamp.common.util.UnsafeUtil; import com.jogamp.nativewindow.AbstractGraphicsConfiguration; @@ -68,7 +68,7 @@ public class Win32SunJDKReflection { private static boolean initialized; static { - AccessController.doPrivileged(new PrivilegedAction() { + SecurityUtil.doPrivileged(new PrivilegedAction() { @Override public Object run() { return UnsafeUtil.doWithoutIllegalAccessLogger(new PrivilegedAction() { diff --git a/src/nativewindow/classes/jogamp/nativewindow/jawt/x11/X11SunJDKReflection.java b/src/nativewindow/classes/jogamp/nativewindow/jawt/x11/X11SunJDKReflection.java index d86704c07..497d901f5 100644 --- a/src/nativewindow/classes/jogamp/nativewindow/jawt/x11/X11SunJDKReflection.java +++ b/src/nativewindow/classes/jogamp/nativewindow/jawt/x11/X11SunJDKReflection.java @@ -44,10 +44,10 @@ import java.awt.GraphicsConfiguration; import java.awt.GraphicsDevice; import java.lang.reflect.Method; -import java.security.AccessController; import java.security.PrivilegedAction; import com.jogamp.common.ExceptionUtils; +import com.jogamp.common.util.SecurityUtil; import com.jogamp.common.util.UnsafeUtil; import com.jogamp.nativewindow.AbstractGraphicsConfiguration; @@ -67,7 +67,7 @@ public class X11SunJDKReflection { private static boolean initialized; static { - AccessController.doPrivileged(new PrivilegedAction() { + SecurityUtil.doPrivileged(new PrivilegedAction() { @Override public Object run() { return UnsafeUtil.doWithoutIllegalAccessLogger(new PrivilegedAction() { diff --git a/src/nativewindow/classes/jogamp/nativewindow/macosx/OSXUtil.java b/src/nativewindow/classes/jogamp/nativewindow/macosx/OSXUtil.java index e06a68953..10a3a602f 100644 --- a/src/nativewindow/classes/jogamp/nativewindow/macosx/OSXUtil.java +++ b/src/nativewindow/classes/jogamp/nativewindow/macosx/OSXUtil.java @@ -32,7 +32,6 @@ import com.jogamp.nativewindow.NativeWindowFactory; import com.jogamp.nativewindow.util.Insets; import com.jogamp.nativewindow.util.Point; -import java.security.AccessController; import java.security.PrivilegedAction; import com.jogamp.common.ExceptionUtils; @@ -41,6 +40,7 @@ import com.jogamp.common.util.Function; import com.jogamp.common.util.FunctionTask; import com.jogamp.common.util.InterruptedRuntimeException; import com.jogamp.common.util.RunnableTask; +import com.jogamp.common.util.SecurityUtil; import jogamp.nativewindow.Debug; import jogamp.nativewindow.NWJNILibLoader; @@ -70,7 +70,7 @@ public class OSXUtil implements ToolkitProperties { } if( useMainThreadChecker ) { final String libMainThreadChecker = "/Applications/Xcode.app/Contents/Developer/usr/lib/libMainThreadChecker.dylib"; - final NativeLibrary lib = AccessController.doPrivileged(new PrivilegedAction() { + final NativeLibrary lib = SecurityUtil.doPrivileged(new PrivilegedAction() { @Override public NativeLibrary run() { return NativeLibrary.open(libMainThreadChecker, false, false, OSXUtil.class.getClassLoader(), true); diff --git a/src/newt/classes/com/jogamp/newt/NewtFactory.java b/src/newt/classes/com/jogamp/newt/NewtFactory.java index 99ce16136..61d21026a 100644 --- a/src/newt/classes/com/jogamp/newt/NewtFactory.java +++ b/src/newt/classes/com/jogamp/newt/NewtFactory.java @@ -34,7 +34,6 @@ package com.jogamp.newt; -import java.security.AccessController; import java.security.PrivilegedAction; import java.util.Arrays; @@ -48,6 +47,7 @@ import com.jogamp.nativewindow.NativeWindowFactory; import com.jogamp.common.util.IOUtil; import com.jogamp.common.util.PropertyAccess; +import com.jogamp.common.util.SecurityUtil; import jogamp.newt.Debug; import jogamp.newt.DisplayImpl; @@ -63,7 +63,7 @@ public class NewtFactory { private static String sysPaths = "newt/data/jogamp-16x16.png newt/data/jogamp-32x32.png"; static { - AccessController.doPrivileged(new PrivilegedAction() { + SecurityUtil.doPrivileged(new PrivilegedAction() { @Override public Object run() { NativeWindowFactory.initSingleton(); // last resort .. diff --git a/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java b/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java index f6c7ad955..c7e1c0a45 100644 --- a/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java +++ b/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java @@ -34,7 +34,6 @@ package com.jogamp.newt.opengl; -import java.security.AccessController; import java.security.PrivilegedAction; import java.util.List; @@ -74,6 +73,7 @@ import jogamp.opengl.GLContextImpl; import jogamp.opengl.GLDrawableImpl; import com.jogamp.common.GlueGenVersion; +import com.jogamp.common.util.SecurityUtil; import com.jogamp.common.util.VersionUtil; import com.jogamp.common.util.locks.RecursiveLock; import com.jogamp.newt.MonitorDevice; @@ -739,7 +739,7 @@ public class GLWindow extends GLAutoDrawableBase implements GLAutoDrawable, Wind if( animThread == Thread.currentThread() ) { anim.stop(); // on anim thread, non-blocking } else { - AccessController.doPrivileged(new PrivilegedAction() { + SecurityUtil.doPrivileged(new PrivilegedAction() { @Override public Object run() { if( anim.isAnimating() && null != animThread ) { diff --git a/src/newt/classes/com/jogamp/newt/util/applet/JOGLNewtAppletBase.java b/src/newt/classes/com/jogamp/newt/util/applet/JOGLNewtAppletBase.java index c30576ff4..055e38020 100644 --- a/src/newt/classes/com/jogamp/newt/util/applet/JOGLNewtAppletBase.java +++ b/src/newt/classes/com/jogamp/newt/util/applet/JOGLNewtAppletBase.java @@ -28,7 +28,6 @@ package com.jogamp.newt.util.applet; import java.lang.reflect.Field; -import java.security.AccessController; import java.security.PrivilegedAction; import com.jogamp.nativewindow.NativeWindow; @@ -43,6 +42,7 @@ import com.jogamp.opengl.GLPipelineFactory; import jogamp.newt.Debug; import com.jogamp.common.util.InterruptSource; +import com.jogamp.common.util.SecurityUtil; import com.jogamp.newt.Window; import com.jogamp.newt.event.KeyEvent; import com.jogamp.newt.event.KeyListener; @@ -119,7 +119,7 @@ public class JOGLNewtAppletBase implements KeyListener, GLEventListener { Object instance = null; try { - final Class clazz = AccessController.doPrivileged(new PrivilegedAction>() { + final Class clazz = SecurityUtil.doPrivileged(new PrivilegedAction>() { @Override public Class run() { final ClassLoader cl = Thread.currentThread().getContextClassLoader(); @@ -312,7 +312,8 @@ public class JOGLNewtAppletBase implements KeyListener, GLEventListener { if(e.getKeyChar()=='r' && 0==e.getModifiers() && null!=parentWin) { e.setConsumed(true); glWindow.invokeOnNewThread(null, false, new Runnable() { - public void run() { + @Override + public void run() { if(null == glWindow.getParent()) { glWindow.reparentWindow(parentWin, -1, -1, 0 /* hints */); } else { diff --git a/src/newt/classes/jogamp/newt/Debug.java b/src/newt/classes/jogamp/newt/Debug.java index a255cb755..60b259214 100644 --- a/src/newt/classes/jogamp/newt/Debug.java +++ b/src/newt/classes/jogamp/newt/Debug.java @@ -28,10 +28,10 @@ package jogamp.newt; -import java.security.AccessController; import java.security.PrivilegedAction; import com.jogamp.common.util.PropertyAccess; +import com.jogamp.common.util.SecurityUtil; /** Helper routines for logging and debugging. */ @@ -41,7 +41,7 @@ public class Debug extends PropertyAccess { private static final boolean debugAll; static { - AccessController.doPrivileged(new PrivilegedAction() { + SecurityUtil.doPrivileged(new PrivilegedAction() { @Override public Object run() { PropertyAccess.addTrustedPrefix("newt."); diff --git a/src/newt/classes/jogamp/newt/NEWTJNILibLoader.java b/src/newt/classes/jogamp/newt/NEWTJNILibLoader.java index fde3de222..e2bf86002 100644 --- a/src/newt/classes/jogamp/newt/NEWTJNILibLoader.java +++ b/src/newt/classes/jogamp/newt/NEWTJNILibLoader.java @@ -39,11 +39,11 @@ package jogamp.newt; -import java.security.AccessController; import java.security.PrivilegedAction; import com.jogamp.common.jvm.JNILibLoaderBase; import com.jogamp.common.os.Platform; +import com.jogamp.common.util.SecurityUtil; import com.jogamp.common.util.cache.TempJarCache; public class NEWTJNILibLoader extends JNILibLoaderBase { @@ -52,7 +52,7 @@ public class NEWTJNILibLoader extends JNILibLoaderBase { * i.e. X11 for Unix, GDI for Windows .. and so forth. */ public static boolean loadNEWTHead() { - return AccessController.doPrivileged(new PrivilegedAction() { + return SecurityUtil.doPrivileged(new PrivilegedAction() { @Override public Boolean run() { Platform.initSingleton(); @@ -68,7 +68,7 @@ public class NEWTJNILibLoader extends JNILibLoaderBase { * Loads the NEWT native library for the drm/gbm display. */ public static boolean loadNEWTDrmGbm() { - return AccessController.doPrivileged(new PrivilegedAction() { + return SecurityUtil.doPrivileged(new PrivilegedAction() { @Override public Boolean run() { Platform.initSingleton(); diff --git a/src/oculusvr/classes/com/jogamp/oculusvr/OVRDynamicLibraryBundleInfo.java b/src/oculusvr/classes/com/jogamp/oculusvr/OVRDynamicLibraryBundleInfo.java index 4b5145ded..6e25c83bb 100644 --- a/src/oculusvr/classes/com/jogamp/oculusvr/OVRDynamicLibraryBundleInfo.java +++ b/src/oculusvr/classes/com/jogamp/oculusvr/OVRDynamicLibraryBundleInfo.java @@ -34,15 +34,15 @@ import com.jogamp.common.os.DynamicLibraryBundleInfo; import com.jogamp.common.os.Platform; import com.jogamp.common.util.RunnableExecutor; import com.jogamp.common.util.cache.TempJarCache; +import com.jogamp.common.util.SecurityUtil; -import java.security.AccessController; import java.security.PrivilegedAction; import java.util.*; /* pp */ final class OVRDynamicLibraryBundleInfo implements DynamicLibraryBundleInfo { private static final List glueLibNames; static { - AccessController.doPrivileged(new PrivilegedAction() { + SecurityUtil.doPrivileged(new PrivilegedAction() { public Object run() { Platform.initSingleton(); -- cgit v1.2.3