Changeset 13336 in josm for trunk/src


Ignore:
Timestamp:
2018-01-19T20:42:21+01:00 (7 years ago)
Author:
Don-vip
Message:

see #15800 - autofix out: issues in overpass queries

File:
1 edited

Legend:

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

    r13335 r13336  
    402402     */
    403403    public static String fixQuery(String query) {
    404         return query.replaceFirst("out( body| skel| ids)?( id| qt)?;", "out meta$2;");
     404        return query == null ? query : query
     405                .replaceFirst("out( body| skel| ids)?( id| qt)?;", "out meta$2;")
     406                .replaceFirst("(?s)\\[out:(json|csv)[^\\]]*\\]", "[out:xml]");
    405407    }
    406408}
Note: See TracChangeset for help on using the changeset viewer.