Ignore:
Timestamp:
2020-10-08T23:25:56+02:00 (4 years ago)
Author:
simon04
Message:

PluginHandlerTestIT: use our Utils.getRootCause

File:
1 edited

Legend:

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

    r16913 r17129  
    2121import java.util.stream.Collectors;
    2222
    23 import org.apache.commons.lang3.exception.ExceptionUtils;
    2423import org.junit.BeforeClass;
    2524import org.junit.ClassRule;
     
    7372
    7473        Map<String, Throwable> loadingExceptions = PluginHandler.pluginLoadingExceptions.entrySet().stream()
    75                 .filter(e -> !(ExceptionUtils.getRootCause(e.getValue()) instanceof HeadlessException))
    76                 .collect(Collectors.toMap(e -> e.getKey(), e -> ExceptionUtils.getRootCause(e.getValue())));
     74                .filter(e -> !(Utils.getRootCause(e.getValue()) instanceof HeadlessException))
     75                .collect(Collectors.toMap(e -> e.getKey(), e -> Utils.getRootCause(e.getValue())));
    7776
    7877        List<PluginInformation> loadedPlugins = PluginHandler.getPlugins();
     
    130129            assertTrue(restartable.parallelStream().noneMatch(info -> PluginHandler.getPlugins().contains(info)));
    131130        } catch (Exception | LinkageError t) {
    132             Throwable root = ExceptionUtils.getRootCause(t);
     131            Throwable root = Utils.getRootCause(t);
    133132            root.printStackTrace();
    134133            noRestartExceptions.put(findFaultyPlugin(loadedPlugins, root), root);
     
    212211            consumer.accept(layer);
    213212        } catch (Exception | LinkageError t) {
    214             Throwable root = ExceptionUtils.getRootCause(t);
     213            Throwable root = Utils.getRootCause(t);
    215214            root.printStackTrace();
    216215            layerExceptions.put(findFaultyPlugin(loadedPlugins, root), root);
Note: See TracChangeset for help on using the changeset viewer.