Changeset 14606 in josm


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

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

Location:
trunk
Files:
2 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
  • trunk/tools/checkstyle/josm_filters.xml

    r13227 r14606  
    4545  <suppress checks="HeaderCheck" files="MultiSplitLayout\.java" />
    4646  <suppress checks="HeaderCheck" files="MultiSplitPane\.java" />
     47  <suppress checks="HeaderCheck" files="ParallelParameterized\.java" />
     48  <suppress checks="HeaderCheck" files="ParallelScheduler\.java" />
    4749  <suppress checks="FileLengthCheck" files="DomainValidator\.java" />
    4850  <suppress checks="org.openstreetmap.josm.TopLevelJavadocCheck" files="package-info\.java" />
Note: See TracChangeset for help on using the changeset viewer.