Mercurial > hg > jdk9-shenandoah > jdk
changeset 12466:5469978f2cef
8132408: Check os.name before os.version in SunGraphicsEnvironment constructor
Reviewed-by: prr
author | simonis |
---|---|
date | Wed, 29 Jul 2015 11:43:44 +0200 |
parents | 78452df4fb79 |
children | c1dc1321df35 |
files | src/java.desktop/share/classes/sun/java2d/SunGraphicsEnvironment.java |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/java.desktop/share/classes/sun/java2d/SunGraphicsEnvironment.java Wed Jul 29 09:47:54 2015 +0400 +++ b/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);