summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/opengl/ThreadingImpl.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2012-03-13 20:19:19 +0100
committerSven Gothel <[email protected]>2012-03-13 20:19:19 +0100
commit7d7e7c901d8fe54af1230cbf10e568f1a8433cbe (patch)
treefe878a3776be351faa3c3f7f10583af5f38c112d /src/jogl/classes/jogamp/opengl/ThreadingImpl.java
parent558a674f5ed727be1536cffd882d43458ce47a37 (diff)
Adapt to gluegen Properties/Security commits f4ac27e177f6deb444280d3b375e7d343e38bd080 and eedb4b530fb83fc59a26962bcf7847a1404092a0
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/ThreadingImpl.java')
-rw-r--r--src/jogl/classes/jogamp/opengl/ThreadingImpl.java15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/jogl/classes/jogamp/opengl/ThreadingImpl.java b/src/jogl/classes/jogamp/opengl/ThreadingImpl.java
index 67a950185..07d5c3402 100644
--- a/src/jogl/classes/jogamp/opengl/ThreadingImpl.java
+++ b/src/jogl/classes/jogamp/opengl/ThreadingImpl.java
@@ -62,9 +62,9 @@ public class ThreadingImpl {
private static final ThreadingPlugin threadingPlugin;
static {
- Object threadingPluginTmp =
- AccessController.doPrivileged(new PrivilegedAction() {
- public Object run() {
+ threadingPlugin =
+ AccessController.doPrivileged(new PrivilegedAction<ThreadingPlugin>() {
+ public ThreadingPlugin run() {
String workaround = Debug.getProperty("jogl.1thread", true);
ClassLoader cl = ThreadingImpl.class.getClassLoader();
// Default to using the AWT thread on all platforms except
@@ -100,21 +100,20 @@ public class ThreadingImpl {
}
printWorkaroundNotice();
- Object threadingPluginObj=null;
+ ThreadingPlugin threadingPlugin=null;
if(hasAWT) {
// try to fetch the AWTThreadingPlugin
Exception error=null;
try {
- threadingPluginObj = ReflectionUtil.createInstance("jogamp.opengl.awt.AWTThreadingPlugin", cl);
+ threadingPlugin = (ThreadingPlugin) ReflectionUtil.createInstance("jogamp.opengl.awt.AWTThreadingPlugin", cl);
} catch (JogampRuntimeException jre) { error = jre; }
- if(AWT == mode && null==threadingPluginObj) {
+ if(AWT == mode && null==threadingPlugin) {
throw new GLException("Mode is AWT, but class 'jogamp.opengl.awt.AWTThreadingPlugin' is not available", error);
}
}
- return threadingPluginObj;
+ return threadingPlugin;
}
});
- threadingPlugin = (ThreadingPlugin) threadingPluginTmp;
if(DEBUG) {
System.err.println("Threading: hasAWT "+hasAWT+", mode "+((mode==AWT)?"AWT":"WORKER")+", plugin "+threadingPlugin);
}