Changeset 11443 in josm


Ignore:
Timestamp:
2017-01-08T16:53:49+01:00 (11 months ago)
Author:
Don-vip
Message:

fix #14211, see #11924 - InaccessibleObjectException with JDK 9 b148+

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/Preferences.java

    r11436 r11443  
    3030import java.util.Map;
    3131import java.util.Map.Entry;
    32 import java.util.MissingResourceException;
    3332import java.util.Objects;
    3433import java.util.Optional;
     
    14261425        // Workaround to fix a Java bug. This ugly hack comes from Sun bug database: https://bugs.openjdk.java.net/browse/JDK-6292739
    14271426        // Force AWT toolkit to update its internal preferences (fix #6345).
     1427        // Does not work anymore with Java 9, to remove with Java 9 migration
    14281428        if (!GraphicsEnvironment.isHeadless()) {
    14291429            try {
     
    14311431                Utils.setObjectsAccessible(field);
    14321432                field.set(null, ResourceBundle.getBundle("sun.awt.resources.awt"));
    1433             } catch (ReflectiveOperationException | MissingResourceException e) {
     1433            } catch (ReflectiveOperationException | RuntimeException e) {
    14341434                Main.warn(e);
    14351435            }
Note: See TracChangeset for help on using the changeset viewer.