7127827: JRE8: javaws fails to launch on oracle linux due to XRender
authorprr
Fri, 13 Jan 2012 13:11:08 -0800
changeset 11495 d92e8e5a71ec
parent 11289 09f33bb6dfb7
child 11496 c01632b809ae
7127827: JRE8: javaws fails to launch on oracle linux due to XRender Reviewed-by: bae, jgodinez
jdk/src/solaris/classes/sun/java2d/xr/XRCompositeManager.java
--- a/jdk/src/solaris/classes/sun/java2d/xr/XRCompositeManager.java	Fri Dec 23 16:38:34 2011 -0800
+++ b/jdk/src/solaris/classes/sun/java2d/xr/XRCompositeManager.java	Fri Jan 13 13:11:08 2012 -0800
@@ -28,6 +28,9 @@
 import java.awt.*;
 import java.awt.geom.*;
 
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+
 import sun.font.*;
 import sun.java2d.*;
 import sun.java2d.jules.*;
@@ -83,7 +86,13 @@
         con = new XRBackendNative();
         // con = XRBackendJava.getInstance();
 
-        String gradProp = System.getProperty("sun.java2d.xrgradcache");
+        String gradProp =
+            AccessController.doPrivileged(new PrivilegedAction<String>() {
+                public String run() {
+                    return System.getProperty("sun.java2d.xrgradcache");
+                }
+            });
+
         enableGradCache = gradProp == null ||
                           !(gradProp.equalsIgnoreCase("false") ||
                           gradProp.equalsIgnoreCase("f"));