Changeset 14778 in josm


Ignore:
Timestamp:
2019-02-10T15:35:17+01:00 (6 weeks ago)
Author:
Don-vip
Message:

see #16912 - filter plugins requiring JavaFX on Java < 11 and headless mode

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/plugins/PluginHandlerTestIT.java

    r14776 r14778  
    77
    88import java.awt.GraphicsEnvironment;
    9 import java.awt.HeadlessException;
    109import java.util.Arrays;
    1110import java.util.Collection;
     
    116115        }
    117116
    118         // On Java 9/10 and headless mode, filter plugins requiring JavaFX as Monocle is not available
     117        // On Java < 11 and headless mode, filter plugins requiring JavaFX as Monocle is not available
    119118        int javaVersion = Utils.getJavaVersion();
    120         if (GraphicsEnvironment.isHeadless() && javaVersion >= 9 && javaVersion <= 10) {
     119        if (GraphicsEnvironment.isHeadless() && javaVersion < 11) {
    121120            for (Iterator<PluginInformation> it = plugins.iterator(); it.hasNext();) {
    122121                PluginInformation pi = it.next();
    123122                if (pi.getRequiredPlugins().contains("openjfx")) {
    124                     System.out.println("Ignoring " + pi.name + " (requiring JavaFX and we're using Java 9/10 in headless mode)");
     123                    System.out.println("Ignoring " + pi.name + " (requiring JavaFX and we're using Java < 11 in headless mode)");
    125124                    it.remove();
    126125                }
     
    147146            Throwable root = ExceptionUtils.getRootCause(t);
    148147            root.printStackTrace();
    149             // Ignore HeadlessException with JavaFX components. Issue hard to solve and we're not interested by that
    150             if (!(root instanceof HeadlessException)) {
    151                 layerExceptions.put(findFaultyPlugin(loadedPlugins, root), root);
    152             }
     148            layerExceptions.put(findFaultyPlugin(loadedPlugins, root), root);
    153149        }
    154150    }
Note: See TracChangeset for help on using the changeset viewer.