- Timestamp:
- 2020-01-06T23:22:18+01:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadGpsTask.java
r15646 r15652 153 153 private String getLayerName() { 154 154 // Extract .gpx filename from URL to set the new layer name 155 final Matcher matcher = Pattern.compile(GpxUrlPattern.EXTERNAL_GPX_FILE.pattern()).matcher(url);156 final String newLayerName = matcher .matches() ? matcher.group(1) : null;155 final Matcher matcher = url != null ? Pattern.compile(GpxUrlPattern.EXTERNAL_GPX_FILE.pattern()).matcher(url) : null; 156 final String newLayerName = matcher != null && matcher.matches() ? matcher.group(1) : null; 157 157 final String metadataName = rawData != null ? rawData.getString(GpxConstants.META_NAME) : null; 158 158 final String defaultName = tr("Downloaded GPX Data");
Note:
See TracChangeset
for help on using the changeset viewer.