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

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/io/OverpassDownloadReader.java

    r16629 r16643  
    336336            final String errorIndicator = "Error</strong>: ";
    337337            if (ex.getMessage() != null && ex.getMessage().contains(errorIndicator)) {
    338                 final String errorPlusRest = ex.getMessage().split(errorIndicator)[1];
     338                final String errorPlusRest = ex.getMessage().split(errorIndicator, -1)[1];
    339339                if (errorPlusRest != null) {
    340                     ex.setErrorHeader(errorPlusRest.split("</")[0].replaceAll(".*::request_read_and_idx::", ""));
     340                    ex.setErrorHeader(errorPlusRest.split("</", -1)[0].replaceAll(".*::request_read_and_idx::", ""));
    341341                }
    342342            }
Note: See TracChangeset for help on using the changeset viewer.