aboutsummaryrefslogtreecommitdiffstats
path: root/src/newt/classes/com
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2023-01-14 21:31:45 +0100
committerSven Gothel <[email protected]>2023-01-14 21:31:45 +0100
commit72a8be591d5daba1e4e231c386812c543d503fce (patch)
treeb4a08e451741eab5a9cad4617e2151bdfd8f5223 /src/newt/classes/com
parent4dfe7369d8e58978dc56235344731f927a1c8ae4 (diff)
Replace AccessController.doPrivileged() w/ SecurityUtil.doPrivileged()
Diffstat (limited to 'src/newt/classes/com')
-rw-r--r--src/newt/classes/com/jogamp/newt/NewtFactory.java4
-rw-r--r--src/newt/classes/com/jogamp/newt/opengl/GLWindow.java4
-rw-r--r--src/newt/classes/com/jogamp/newt/util/applet/JOGLNewtAppletBase.java7
3 files changed, 8 insertions, 7 deletions
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<Object>() {
+ SecurityUtil.doPrivileged(new PrivilegedAction<Object>() {
@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<Object>() {
+ SecurityUtil.doPrivileged(new PrivilegedAction<Object>() {
@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<Class<?>>() {
+ final Class<?> clazz = SecurityUtil.doPrivileged(new PrivilegedAction<Class<?>>() {
@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 {