From d481cf6ddeb4b2ddb787826eb18b28e9c0401ca8 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Wed, 2 Oct 2013 23:59:45 +0200 Subject: PropertyAccess: Add trusted properties sun.java2d.opengl, sun.java2d.noddraw, sun.java2d.d3d, sun.awt.noerasebackground --- src/java/com/jogamp/common/util/PropertyAccess.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/java/com/jogamp/common/util') 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 trustedPrefixes; + static final HashSet trusted; static { trustedPrefixes = new HashSet(); trustedPrefixes.add(javaws_prefix); trustedPrefixes.add(jnlp_prefix); // 'jogamp.' and maybe other trusted prefixes will be added later via 'addTrustedPrefix()' + + trusted = new HashSet(); + 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; } -- cgit v1.2.3