summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2012-04-25 13:09:30 +0200
committerSven Gothel <[email protected]>2012-04-25 13:09:30 +0200
commit4ce601b38ca8418eddbe8cca4d531e6161fae26b (patch)
tree67c98dcd4ea4495ecf38a4b9c38dafee088dae1a
parent993fedde61c6fd5f38351b69c483a1bf8196bc99 (diff)
PropertyAccess: Cleanup code, adding comment.v2.0-rc8v2.0-rc7
-rw-r--r--src/java/com/jogamp/common/util/PropertyAccess.java13
1 files 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<String>() {
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;
}