Changeset 14518 in josm for trunk/src/org


Ignore:
Timestamp:
2018-12-07T12:25:31+01:00 (5 years ago)
Author:
GerdP
Message:

fix #17081 correction and unit test

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/osm/TagCollection.java

    r14303 r14518  
    123123        if (primitives == null || primitives.isEmpty()) return tags;
    124124        // initialize with the first
    125         //
    126125        tags.add(TagCollection.from(primitives.iterator().next()));
    127126
     
    132131                continue;
    133132            }
    134             tags.add(tags.intersect(TagCollection.from(primitive)));
     133            tags = tags.intersect(TagCollection.from(primitive));
     134            if (tags.isEmpty())
     135                break;
    135136        }
    136137        return tags;
Note: See TracChangeset for help on using the changeset viewer.