< prev index next >

src/java.desktop/share/classes/sun/java2d/SunGraphicsEnvironment.java

Print this page
rev 12441 : 8132408: Check os.name before os.version in SunGraphicsEnvironment constructor

*** 82,91 **** --- 82,93 ---- public SunGraphicsEnvironment() { 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); if (ver > 5.10f) { File f = new File("/etc/release");
*** 115,125 **** } fis.close(); } } catch (Exception e) { } ! /* Establish the default font to be used by SG2D etc */ defaultFont = new Font(Font.DIALOG, Font.PLAIN, 12); return null; } --- 117,127 ---- } fis.close(); } } catch (Exception e) { } ! } /* Establish the default font to be used by SG2D etc */ defaultFont = new Font(Font.DIALOG, Font.PLAIN, 12); return null; }
< prev index next >