Ignore:
Timestamp:
2018-12-28T13:44:19+01:00 (6 years ago)
Author:
Don-vip
Message:

see #16073 - handle locale-dependent error messages such as XML parsing errors

File:
1 edited

Legend:

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

    r14605 r14606  
    8181    @ClassRule
    8282    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    83     public static JOSMTestRules test = new JOSMTestRules().https().preferences().projection().projectionNadGrids()
     83    public static JOSMTestRules test = new JOSMTestRules().https().i18n().preferences().projection().projectionNadGrids()
    8484                                                   .timeout((int) TimeUnit.MINUTES.toMillis(40));
    8585
     
    123123        ImageryLayerInfo.instance.load(false);
    124124        return ImageryLayerInfo.instance.getDefaultLayers()
    125                 .stream().map(x -> new Object[] {x.getId(), x})
     125                .stream()
     126                .map(x -> new Object[] {x.getId(), x})
    126127                .collect(Collectors.toList());
    127128    }
     
    137138
    138139    private boolean addError(ImageryInfo info, String error) {
    139         return !ignoredErrors.contains(error) &&
     140        String errorMsg = error.replace('\n', ' ');
     141        return !ignoredErrors.contains(errorMsg) &&
    140142               errors.computeIfAbsent(info.getCountryCode(), x -> Collections.synchronizedMap(new TreeMap<>()))
    141143                     .computeIfAbsent(info, x -> Collections.synchronizedList(new ArrayList<>()))
    142                      .add(error);
     144                     .add(errorMsg);
    143145    }
    144146
Note: See TracChangeset for help on using the changeset viewer.