8132408: Check os.name before os.version in SunGraphicsEnvironment constructor
Reviewed-by: prr
--- a/jdk/src/java.desktop/share/classes/sun/java2d/SunGraphicsEnvironment.java Wed Jul 29 09:47:54 2015 +0400
+++ b/jdk/src/java.desktop/share/classes/sun/java2d/SunGraphicsEnvironment.java Wed Jul 29 11:43:44 2015 +0200
@@ -84,6 +84,8 @@
java.security.AccessController.doPrivileged(
new java.security.PrivilegedAction<Object>() {
public Object run() {
+ String osName = System.getProperty("os.name");
+ if ("SunOS".equals(osName)) {
String version = System.getProperty("os.version", "0.0");
try {
float ver = Float.parseFloat(version);
@@ -117,7 +119,7 @@
}
} catch (Exception e) {
}
-
+ }
/* Establish the default font to be used by SG2D etc */
defaultFont = new Font(Font.DIALOG, Font.PLAIN, 12);