Changeset 11836 in josm


Ignore:
Timestamp:
2017-04-04T12:54:43+02:00 (8 months ago)
Author:
bastiK
Message:

fixed #14604 - Error on import

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadOsmTask.java

    r11774 r11836  
    88import java.util.ArrayList;
    99import java.util.Collection;
     10import java.util.Collections;
    1011import java.util.HashSet;
    1112import java.util.Optional;
     
    292293         * Look for primitives deleted on server (thus absent from downloaded data)
    293294         * but still present in existing data layer
    294          * @param b download bounds
     295         * @param bounds download bounds
    295296         * @param ds existing data set
    296297         * @return the primitives to update
    297298         */
    298         private Collection<OsmPrimitive> searchPrimitivesToUpdate(Bounds b, DataSet ds) {
     299        private Collection<OsmPrimitive> searchPrimitivesToUpdate(Bounds bounds, DataSet ds) {
     300            if (bounds == null)
     301                return Collections.EMPTY_SET;
    299302            Collection<OsmPrimitive> col = new ArrayList<>();
    300             ds.searchNodes(b.toBBox()).stream().filter(n -> !n.isNew() && !dataSet.containsNode(n)).forEachOrdered(col::add);
     303            ds.searchNodes(bounds.toBBox()).stream().filter(n -> !n.isNew() && !dataSet.containsNode(n)).forEachOrdered(col::add);
    301304            if (!col.isEmpty()) {
    302305                Set<Way> ways = new HashSet<>();
Note: See TracChangeset for help on using the changeset viewer.