From 4ce601b38ca8418eddbe8cca4d531e6161fae26b Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Wed, 25 Apr 2012 13:09:30 +0200 Subject: PropertyAccess: Cleanup code, adding comment. --- src/java/com/jogamp/common/util/PropertyAccess.java | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/java/com/jogamp/common/util/PropertyAccess.java b/src/java/com/jogamp/common/util/PropertyAccess.java index 92e8a3d..72d9c5e 100644 --- a/src/java/com/jogamp/common/util/PropertyAccess.java +++ b/src/java/com/jogamp/common/util/PropertyAccess.java @@ -136,11 +136,12 @@ public class PropertyAccess { if(0 == propertyKey.length()) { throw new IllegalArgumentException("propertyKey is empty"); } - if(isTrusted(propertyKey)) { + if( isTrusted(propertyKey) ) { + // uses 'trusted' prefix, don't add jnlp prefix return getTrustedPropKey(propertyKey); } String s=null; - if( null!=acc ) { + if( null != acc ) { s = AccessController.doPrivileged(new PrivilegedAction() { public String run() { return System.getProperty(propertyKey); @@ -148,12 +149,10 @@ public class PropertyAccess { } else { s = System.getProperty(propertyKey); } - if(null==s && jnlpAlias) { + if( null == s && jnlpAlias ) { // Properties within the namespace "jnlp." or "javaws." should be considered trusted, - // i.e. always granted w/o special priviledges. - // FIXME: Nevertheless we use this class AccessControlContext to ensure access - // on all supported implementations. - return getTrustedPropKey(jnlp_prefix + propertyKey); + // i.e. always granted w/o special privileges. + s = getTrustedPropKey(jnlp_prefix + propertyKey); } return s; } -- cgit v1.2.3