summaryrefslogtreecommitdiffstats
path: root/src/nativewindow/classes/com/jogamp
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/nativewindow/classes/com/jogamp
parent4dfe7369d8e58978dc56235344731f927a1c8ae4 (diff)
Replace AccessController.doPrivileged() w/ SecurityUtil.doPrivileged()
Diffstat (limited to 'src/nativewindow/classes/com/jogamp')
-rw-r--r--src/nativewindow/classes/com/jogamp/nativewindow/NativeWindowFactory.java6
-rw-r--r--src/nativewindow/classes/com/jogamp/nativewindow/awt/AppContextInfo.java4
-rw-r--r--src/nativewindow/classes/com/jogamp/nativewindow/javafx/JFXAccessor.java5
-rw-r--r--src/nativewindow/classes/com/jogamp/nativewindow/swt/SWTAccessor.java4
4 files changed, 10 insertions, 9 deletions
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<Object>() {
+ SecurityUtil.doPrivileged(new PrivilegedAction<Object>() {
@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<Method[]>() {
+ final Method[] jawtUtilMethods = SecurityUtil.doPrivileged(new PrivilegedAction<Method[]>() {
@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<Object>() {
+ SecurityUtil.doPrivileged(new PrivilegedAction<Object>() {
@Override
public Object run() {
return UnsafeUtil.doWithoutIllegalAccessLogger(new PrivilegedAction<Object>() {
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<Method[]>() {
+ final Method[] res = SecurityUtil.doPrivileged(new PrivilegedAction<Method[]>() {
@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<Object>() {
+ SecurityUtil.doPrivileged(new PrivilegedAction<Object>() {
@Override
public Object run() {
NativeWindowFactory.initSingleton(); // last resort ..