Changeset 8817 in josm
- Timestamp:
- 2015-10-03T01:23:15+02:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/Preferences.java
r8816 r8817 5 5 6 6 import java.awt.Color; 7 import java.awt.GraphicsEnvironment; 7 8 import java.awt.Toolkit; 8 9 import java.io.BufferedReader; … … 1485 1486 // Force AWT toolkit to update its internal preferences (fix #6345). 1486 1487 // This ugly hack comes from Sun bug database: https://bugs.openjdk.java.net/browse/JDK-6292739 1487 try { 1488 Field field = Toolkit.class.getDeclaredField("resources"); 1489 field.setAccessible(true); 1490 field.set(null, ResourceBundle.getBundle("sun.awt.resources.awt")); 1491 } catch (Exception | InternalError e) { 1492 // Ignore all exceptions, including internal error raised by Java 9 Jigsaw EA: 1493 // java.lang.InternalError: legacy getBundle can't be used to find sun.awt.resources.awt in module java.desktop 1494 // InternalError catch to remove when https://bugs.openjdk.java.net/browse/JI-9025152 is resolved 1495 if (Main.isTraceEnabled()) { 1496 Main.trace(e.getMessage()); 1488 if (!GraphicsEnvironment.isHeadless()) { 1489 try { 1490 Field field = Toolkit.class.getDeclaredField("resources"); 1491 field.setAccessible(true); 1492 field.set(null, ResourceBundle.getBundle("sun.awt.resources.awt")); 1493 } catch (Exception | InternalError e) { 1494 // Ignore all exceptions, including internal error raised by Java 9 Jigsaw EA: 1495 // java.lang.InternalError: legacy getBundle can't be used to find sun.awt.resources.awt in module java.desktop 1496 // InternalError catch to remove when https://bugs.openjdk.java.net/browse/JI-9025152 is resolved 1497 if (Main.isTraceEnabled()) { 1498 Main.trace(e.getMessage()); 1499 } 1497 1500 } 1498 1501 }
Note:
See TracChangeset
for help on using the changeset viewer.