aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/jogamp/common/Debug.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/java/jogamp/common/Debug.java')
-rw-r--r--src/java/jogamp/common/Debug.java32
1 files changed, 14 insertions, 18 deletions
diff --git a/src/java/jogamp/common/Debug.java b/src/java/jogamp/common/Debug.java
index b8ed098..f75b37b 100644
--- a/src/java/jogamp/common/Debug.java
+++ b/src/java/jogamp/common/Debug.java
@@ -39,38 +39,34 @@
package jogamp.common;
-import java.security.*;
+import com.jogamp.common.util.PropertyAccess;
/** Helper routines for logging and debugging. */
public class Debug extends PropertyAccess {
// Some common properties
- private static boolean verbose;
- private static boolean debugAll;
- private static AccessControlContext localACC;
+ private static final boolean verbose;
+ private static final boolean debugAll;
static {
- localACC=AccessController.getContext();
+ PropertyAccess.addTrustedPrefix("jogamp.", Debug.class);
+
verbose = isPropertyDefined("jogamp.verbose", true);
debugAll = isPropertyDefined("jogamp.debug", true);
}
- static int getIntProperty(final String property, final boolean jnlpAlias) {
- return getIntProperty(property, jnlpAlias, localACC, 0);
- }
-
- static boolean getBooleanProperty(final String property, final boolean jnlpAlias) {
- return getBooleanProperty(property, jnlpAlias, localACC);
+ public static final boolean getBooleanProperty(final String property, final boolean jnlpAlias) {
+ return PropertyAccess.getBooleanProperty(property, jnlpAlias, null);
}
-
- static boolean isPropertyDefined(final String property, final boolean jnlpAlias) {
- return isPropertyDefined(property, jnlpAlias, localACC);
+
+ public static final boolean getBooleanProperty(final String property, final boolean jnlpAlias, boolean defaultValue) {
+ return PropertyAccess.getBooleanProperty(property, jnlpAlias, null, defaultValue);
}
-
- static String getProperty(final String property, final boolean jnlpAlias) {
- return getProperty(property, jnlpAlias, localACC);
+
+ public static final long getLongProperty(final String property, final boolean jnlpAlias, long defaultValue) {
+ return PropertyAccess.getLongProperty(property, jnlpAlias, null, defaultValue);
}
-
+
public static boolean verbose() {
return verbose;
}