Ignore:
Timestamp:
2020-06-14T20:19:59+02:00 (4 years ago)
Author:
simon04
Message:

see #19334 - https://errorprone.info/bugpattern/StringSplitter

File:
1 edited

Legend:

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

    r16438 r16643  
    248248        // Check if we have received an error message
    249249        String error = helper.detectErrorMessage(new String(data, StandardCharsets.UTF_8));
    250         String errorMsg = url + zoomMarker(zoom) + (error != null ? error.split("\\n")[0] : defaultMessage);
     250        String errorMsg = url + zoomMarker(zoom) + (error != null ? error.split("\\n", -1)[0] : defaultMessage);
    251251        addError(info, errorMsg);
    252252        return errorMsg;
     
    344344
    345345    private static boolean isZoomError(String error) {
    346         String[] parts = error.split(ERROR_SEP);
     346        String[] parts = error.split(ERROR_SEP, -1);
    347347        String lastPart = parts.length > 0 ? parts[parts.length - 1].toLowerCase(Locale.ENGLISH) : "";
    348348        return lastPart.contains("bbox")
Note: See TracChangeset for help on using the changeset viewer.