summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2013-06-11 16:27:15 +0200
committerSven Gothel <[email protected]>2013-06-11 16:27:15 +0200
commit072ac81a76db9c9eb24c639a38bee75bf0ed5c9e (patch)
tree7b894ac6481ef501bad3970fb6ed9db73f090aa1
parentf92b110509aa507947c19ad29e8d0656cf75a669 (diff)
Adapt to GlueGen commit 1a01dce6c42b398cdd68d405828774a3ab366456
-rw-r--r--make/joal-common-CustomJavaCode.java11
-rw-r--r--src/java/com/jogamp/openal/ALFactory.java5
-rw-r--r--src/java/jogamp/openal/Debug.java17
3 files changed, 17 insertions, 16 deletions
diff --git a/make/joal-common-CustomJavaCode.java b/make/joal-common-CustomJavaCode.java
index be6b8a7..436f462 100644
--- a/make/joal-common-CustomJavaCode.java
+++ b/make/joal-common-CustomJavaCode.java
@@ -7,12 +7,11 @@ static {
throw new RuntimeException("Couldn't instantiate ALProcAddressTable");
}
- alDynamicLookupHelper = (DynamicLibraryBundle)
- AccessController.doPrivileged(new PrivilegedAction() {
- public Object run() {
- return new DynamicLibraryBundle(new ALDynamicLibraryBundleInfo());
- }
- });
+ alDynamicLookupHelper = AccessController.doPrivileged(new PrivilegedAction<DynamicLibraryBundle>() {
+ public DynamicLibraryBundle run() {
+ return new DynamicLibraryBundle(new ALDynamicLibraryBundleInfo());
+ } } );
+
if(null==alDynamicLookupHelper) {
throw new RuntimeException("Null ALDynamicLookupHelper");
}
diff --git a/src/java/com/jogamp/openal/ALFactory.java b/src/java/com/jogamp/openal/ALFactory.java
index 0889d85..b365cd8 100644
--- a/src/java/com/jogamp/openal/ALFactory.java
+++ b/src/java/com/jogamp/openal/ALFactory.java
@@ -68,10 +68,7 @@ public class ALFactory {
static {
Platform.initSingleton();
- final String choice= AccessController.doPrivileged(new PrivilegedAction<String>() {
- public String run() {
- return Debug.getProperty("joal.openal.lib", true, null);
- } });
+ final String choice = Debug.getProperty("joal.openal.lib", true);
boolean useSystem = Platform.OSType.MACOS == Platform.OS_TYPE; // default
if( null != choice ) {
if( choice.equals("system") ) {
diff --git a/src/java/jogamp/openal/Debug.java b/src/java/jogamp/openal/Debug.java
index b73c955..098b640 100644
--- a/src/java/jogamp/openal/Debug.java
+++ b/src/java/jogamp/openal/Debug.java
@@ -1,5 +1,6 @@
/*
* Copyright (c) 2003-2005 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright (c) 2012 JogAmp Community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -39,6 +40,9 @@
package jogamp.openal;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+
import com.jogamp.common.util.PropertyAccess;
@@ -50,15 +54,16 @@ public class Debug extends PropertyAccess {
private static boolean debugAll;
static {
- PropertyAccess.addTrustedPrefix("joal.", Debug.class);
+ AccessController.doPrivileged(new PrivilegedAction<Object>() {
+ public Object run() {
+ PropertyAccess.addTrustedPrefix("joal.");
+ return null;
+ } } );
+
verbose = isPropertyDefined("joal.verbose", true);
debugAll = isPropertyDefined("joal.debug", true);
}
- public static final boolean isPropertyDefined(final String property, final boolean jnlpAlias) {
- return PropertyAccess.isPropertyDefined(property, jnlpAlias, null);
- }
-
public static boolean verbose() {
return verbose;
}
@@ -68,6 +73,6 @@ public class Debug extends PropertyAccess {
}
public static boolean debug(String subcomponent) {
- return debugAll() || isPropertyDefined("joal.debug." + subcomponent, true, null);
+ return debugAll() || isPropertyDefined("joal.debug." + subcomponent, true);
}
}