Changeset 14789 in josm for trunk/test


Ignore:
Timestamp:
2019-02-15T00:44:10+01:00 (5 years ago)
Author:
Don-vip
Message:

see #16073 - allow to ignore error only based on a substring

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/gui/preferences/imagery/ImageryPreferenceTestIT.java

    r14694 r14789  
    161161    }
    162162
    163     private boolean isIgnoredError(String errorMsg) {
     163    private static boolean isIgnoredError(String errorMsg) {
    164164        int idx = errorMsg.lastIndexOf(ERROR_SEP);
    165         return errorsToIgnore.contains(errorMsg) || (idx > -1 && errorsToIgnore.contains(errorMsg.substring(idx + ERROR_SEP.length())));
     165        return isIgnoredSubstring(errorMsg) || (idx > -1 && isIgnoredSubstring(errorMsg.substring(idx + ERROR_SEP.length())));
     166    }
     167
     168    private static boolean isIgnoredSubstring(String substring) {
     169        return errorsToIgnore.parallelStream().anyMatch(x -> x.contains(substring));
    166170    }
    167171
Note: See TracChangeset for help on using the changeset viewer.