From eedb4b530fb83fc59a26962bcf7847a1404092a0 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Tue, 13 Mar 2012 20:12:40 +0100 Subject: PropertyAccess: Push down 'isPropertyDefined(final String property, final boolean jnlpAlias)' for trusted properties The method shall be called by the respective Debug specialization, which registers the trusted property prefix. --- src/java/com/jogamp/common/util/IOUtil.java | 3 ++- src/java/com/jogamp/common/util/PropertyAccess.java | 5 ----- src/java/jogamp/common/Debug.java | 4 ++++ 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/java/com/jogamp/common/util/IOUtil.java b/src/java/com/jogamp/common/util/IOUtil.java index 0ae8521..a05302a 100644 --- a/src/java/com/jogamp/common/util/IOUtil.java +++ b/src/java/com/jogamp/common/util/IOUtil.java @@ -43,6 +43,7 @@ import java.net.URL; import java.net.URLConnection; import java.nio.ByteBuffer; +import jogamp.common.Debug; import jogamp.common.os.android.StaticContext; import android.content.Context; @@ -53,7 +54,7 @@ import com.jogamp.common.os.MachineDescription; import com.jogamp.common.os.Platform; public class IOUtil { - private static final boolean DEBUG = PropertyAccess.isPropertyDefined("jogamp.debug.IOUtil", true); + private static final boolean DEBUG = Debug.isPropertyDefined("jogamp.debug.IOUtil", true); /** Std. temporary directory property key java.io.tmpdir */ public static final String java_io_tmpdir_propkey = "java.io.tmpdir"; diff --git a/src/java/com/jogamp/common/util/PropertyAccess.java b/src/java/com/jogamp/common/util/PropertyAccess.java index f0d49e0..92e8a3d 100644 --- a/src/java/com/jogamp/common/util/PropertyAccess.java +++ b/src/java/com/jogamp/common/util/PropertyAccess.java @@ -107,11 +107,6 @@ public class PropertyAccess { return (PropertyAccess.getProperty(property, jnlpAlias, acc) != null) ? true : false; } - /** @see #getProperty(String, boolean, AccessControlContext) */ - public static final boolean isPropertyDefined(final String property, final boolean jnlpAlias) { - return (PropertyAccess.getProperty(property, jnlpAlias, null) != null) ? true : false; - } - /** * Query the property with the name propertyKey. *

diff --git a/src/java/jogamp/common/Debug.java b/src/java/jogamp/common/Debug.java index f75b37b..19e2fd7 100644 --- a/src/java/jogamp/common/Debug.java +++ b/src/java/jogamp/common/Debug.java @@ -55,6 +55,10 @@ public class Debug extends PropertyAccess { debugAll = isPropertyDefined("jogamp.debug", true); } + public static final boolean isPropertyDefined(final String property, final boolean jnlpAlias) { + return PropertyAccess.isPropertyDefined(property, jnlpAlias, null); + } + public static final boolean getBooleanProperty(final String property, final boolean jnlpAlias) { return PropertyAccess.getBooleanProperty(property, jnlpAlias, null); } -- cgit v1.2.3