Changeset 8799 in josm


Ignore:
Timestamp:
2015-09-27T19:45:21+02:00 (9 years ago)
Author:
simon04
Message:

fix #11898 - Command line --download option broken for bounds

Location:
trunk
Files:
1 added
1 edited

Legend:

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

    r8738 r8799  
    11361136     * @see #paramType
    11371137     */
    1138     private enum DownloadParamType { httpUrl, fileUrl, bounds, fileName }
     1138    enum DownloadParamType { httpUrl, fileUrl, bounds, fileName }
    11391139
    11401140    /**
     
    11431143     * @return The guessed parameter type
    11441144     */
    1145     private static DownloadParamType paramType(String s) {
     1145    static DownloadParamType paramType(String s) {
    11461146        if (s.startsWith("http:") || s.startsWith("https:")) return DownloadParamType.httpUrl;
    11471147        if (s.startsWith("file:")) return DownloadParamType.fileUrl;
    11481148        String coorPattern = "\\s*[+-]?[0-9]+(\\.[0-9]+)?\\s*";
    1149         if (s.matches(coorPattern+"(,"+coorPattern+") {3}")) return DownloadParamType.bounds;
     1149        if (s.matches(coorPattern+"(,"+coorPattern+"){3}")) return DownloadParamType.bounds;
    11501150        // everything else must be a file name
    11511151        return DownloadParamType.fileName;
Note: See TracChangeset for help on using the changeset viewer.