Changeset 4901 in josm for trunk/src/org
- Timestamp:
- 2012-02-05T20:51:01+01:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/Main.java
r4897 r4901 639 639 if(s.startsWith("http:")) return DownloadParamType.httpUrl; 640 640 if(s.startsWith("file:")) return DownloadParamType.fileUrl; 641 final StringTokenizer st = new StringTokenizer(s, ","); 642 // we assume a string with exactly 3 commas is a bounds parameter 643 if (st.countTokens() == 4) return DownloadParamType.bounds; 641 String coorPattern = "\\s*[0-9]+(\\.[0-9]+)?\\s*"; 642 if(s.matches(coorPattern+"(,"+coorPattern+"){3}")) return DownloadParamType.bounds; 644 643 // everything else must be a file name 645 644 return DownloadParamType.fileName;
Note:
See TracChangeset
for help on using the changeset viewer.