summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/java/com/jogamp/openal/ALFactory.java5
-rw-r--r--src/java/jogamp/openal/ALDynamicLibraryBundleInfo.java30
-rw-r--r--src/java/jogamp/openal/Debug.java17
3 files changed, 32 insertions, 20 deletions
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/ALDynamicLibraryBundleInfo.java b/src/java/jogamp/openal/ALDynamicLibraryBundleInfo.java
index 59765fe..efb88d1 100644
--- a/src/java/jogamp/openal/ALDynamicLibraryBundleInfo.java
+++ b/src/java/jogamp/openal/ALDynamicLibraryBundleInfo.java
@@ -40,8 +40,8 @@ import java.security.AccessController;
import java.security.PrivilegedAction;
import java.util.*;
-public class ALDynamicLibraryBundleInfo implements DynamicLibraryBundleInfo {
- private static List<String> glueLibNames;
+public final class ALDynamicLibraryBundleInfo implements DynamicLibraryBundleInfo {
+ private static final List<String> glueLibNames;
static {
AccessController.doPrivileged(new PrivilegedAction<Object>() {
public Object run() {
@@ -62,13 +62,23 @@ public class ALDynamicLibraryBundleInfo implements DynamicLibraryBundleInfo {
protected ALDynamicLibraryBundleInfo() {
}
- /** FIXME: not default, maybe local ? **/
+ /**
+ * <p>
+ * Returns <code>true</code>,
+ * since we might load the library and allow symbol access to subsequent libs.
+ * </p>
+ */
@Override
- public boolean shallLinkGlobal() { return true; }
-
- /** default **/
+ public final boolean shallLinkGlobal() { return true; }
+
+ /**
+ * {@inheritDoc}
+ * <p>
+ * Returns <code>false</code>.
+ * </p>
+ */
@Override
- public boolean shallLookupGlobal() { return false; }
+ public final boolean shallLookupGlobal() { return false; }
@Override
public final List<String> getGlueLibNames() {
@@ -76,7 +86,7 @@ public class ALDynamicLibraryBundleInfo implements DynamicLibraryBundleInfo {
}
@Override
- public List<List<String>> getToolLibNames() {
+ public final List<List<String>> getToolLibNames() {
List<List<String>> libNamesList = new ArrayList<List<String>>();
final List<String> alSystemLibNames = new ArrayList<String>();
@@ -138,12 +148,12 @@ public class ALDynamicLibraryBundleInfo implements DynamicLibraryBundleInfo {
}
@Override
- public boolean useToolGetProcAdressFirst(String funcName) {
+ public final boolean useToolGetProcAdressFirst(String funcName) {
return true;
}
@Override
- public RunnableExecutor getLibLoaderExecutor() {
+ public final RunnableExecutor getLibLoaderExecutor() {
return DynamicLibraryBundle.getDefaultRunnableExecutor();
}
}
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);
}
}