diff options
author | Sven Gothel <[email protected]> | 2013-10-02 23:59:45 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2013-10-02 23:59:45 +0200 |
commit | d481cf6ddeb4b2ddb787826eb18b28e9c0401ca8 (patch) | |
tree | f003e13e1bbf4ff8ee0a328033f6c880aae4e55c /src/java/com/jogamp | |
parent | ca7a1864a1624539048809d0a1c491f57c145d15 (diff) |
PropertyAccess: Add trusted properties sun.java2d.opengl, sun.java2d.noddraw, sun.java2d.d3d, sun.awt.noerasebackground
Diffstat (limited to 'src/java/com/jogamp')
-rw-r--r-- | src/java/com/jogamp/common/util/PropertyAccess.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/java/com/jogamp/common/util/PropertyAccess.java b/src/java/com/jogamp/common/util/PropertyAccess.java index 1a4bc7e..fdb2665 100644 --- a/src/java/com/jogamp/common/util/PropertyAccess.java +++ b/src/java/com/jogamp/common/util/PropertyAccess.java @@ -40,12 +40,19 @@ public class PropertyAccess { public static final String javaws_prefix = "javaws."; static final HashSet<String> trustedPrefixes; + static final HashSet<String> trusted; static { trustedPrefixes = new HashSet<String>(); trustedPrefixes.add(javaws_prefix); trustedPrefixes.add(jnlp_prefix); // 'jogamp.' and maybe other trusted prefixes will be added later via 'addTrustedPrefix()' + + trusted = new HashSet<String>(); + trusted.add("sun.java2d.opengl"); + trusted.add("sun.java2d.noddraw"); + trusted.add("sun.java2d.d3d"); + trusted.add("sun.awt.noerasebackground"); } /** @@ -60,7 +67,7 @@ public class PropertyAccess { public static final boolean isTrusted(String propertyKey) { final int dot1 = propertyKey.indexOf('.'); if(0<=dot1) { - return trustedPrefixes.contains(propertyKey.substring(0, dot1+1)); + return trustedPrefixes.contains(propertyKey.substring(0, dot1+1)) || trusted.contains(propertyKey); } else { return false; } |