Changeset 10315 in josm for trunk/src/org
- Timestamp:
- 2016-06-02T02:22:40+02:00 (8 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadOsmTask.java
r10212 r10315 218 218 protected int getNumDataLayers() { 219 219 if (!Main.isDisplayingMapView()) return 0; 220 int count = 0; 221 Collection<Layer> layers = Main.map.mapView.getAllLayers(); 222 for (Layer layer : layers) { 223 if (layer instanceof OsmDataLayer) { 224 count++; 225 } 226 } 227 return count; 220 return Utils.filteredCollection(Main.map.mapView.getAllLayers(), OsmDataLayer.class).size(); 228 221 } 229 222 -
trunk/src/org/openstreetmap/josm/io/OsmServerLocationReader.java
r10212 r10315 6 6 import java.io.IOException; 7 7 import java.io.InputStream; 8 import java.util. ArrayList;8 import java.util.Collections; 9 9 import java.util.List; 10 10 … … 178 178 in = getInputStream(url, progressMonitor.createSubTaskMonitor(1, true)); 179 179 if (in == null) { 180 return new ArrayList<>();180 return Collections.emptyList(); 181 181 } 182 182 progressMonitor.subTask(tr("Downloading OSM notes...")); -
trunk/src/org/openstreetmap/josm/tools/Utils.java
r10294 r10315 395 395 return Arrays.copyOf(array, array.length); 396 396 } 397 return null;397 return array; 398 398 } 399 399 … … 408 408 return Arrays.copyOf(array, array.length); 409 409 } 410 return null;410 return array; 411 411 } 412 412 … … 421 421 return Arrays.copyOf(array, array.length); 422 422 } 423 return null;423 return array; 424 424 } 425 425
Note:
See TracChangeset
for help on using the changeset viewer.