diff options
author | Sven Gothel <[email protected]> | 2011-09-23 14:08:13 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2011-09-23 14:08:13 +0200 |
commit | 609e649443f900116039cda7a1bc7c9359b0242f (patch) | |
tree | 6bc208a3df2f5c487c0631e5e51b34e07f5f97f4 /src/java/jogamp | |
parent | 0a54e4b8e2923d1c4eb5847a397906fb783a10d3 (diff) |
Add boolean system property 'jogamp.gluegen.UseTempJarCache', defaults to 'true' - allowing to disable usage of TempJarCache.
Diffstat (limited to 'src/java/jogamp')
-rw-r--r-- | src/java/jogamp/common/Debug.java | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/java/jogamp/common/Debug.java b/src/java/jogamp/common/Debug.java index e425e9c..cf07255 100644 --- a/src/java/jogamp/common/Debug.java +++ b/src/java/jogamp/common/Debug.java @@ -88,8 +88,15 @@ public class Debug { } public static boolean getBooleanProperty(final String property, final boolean jnlpAlias, final AccessControlContext acc) { - Boolean b = Boolean.valueOf(Debug.getProperty(property, jnlpAlias, acc)); - return b.booleanValue(); + return Boolean.valueOf(Debug.getProperty(property, jnlpAlias, acc)).booleanValue(); + } + + public static boolean getBooleanProperty(boolean defaultValue, final String property, final boolean jnlpAlias, final AccessControlContext acc) { + final String valueS = Debug.getProperty(property, jnlpAlias, acc); + if(null != valueS) { + return Boolean.valueOf(Debug.getProperty(property, jnlpAlias, acc)).booleanValue(); + } + return defaultValue; } static boolean isPropertyDefined(final String property, final boolean jnlpAlias) { @@ -107,8 +114,8 @@ public class Debug { public static String getProperty(final String property, final boolean jnlpAlias, final AccessControlContext acc) { String s=null; if(null!=acc && acc.equals(localACC)) { - s = (String) AccessController.doPrivileged(new PrivilegedAction() { - public Object run() { + s = AccessController.doPrivileged(new PrivilegedAction<String>() { + public String run() { String val=null; try { val = System.getProperty(property); |