Changeset 15014 in josm


Ignore:
Timestamp:
2019-04-22T15:12:54+02:00 (7 months ago)
Author:
Don-vip
Message:

see #17635 - make sure primitives can't be created with invalid tags using setKeys method

File:
1 edited

Legend:

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

    r15012 r15014  
    1515import java.util.Map;
    1616import java.util.Map.Entry;
     17import java.util.Objects;
    1718import java.util.Set;
    1819import java.util.concurrent.TimeUnit;
     
    498499        int index = 0;
    499500        for (Entry<String, String> entry:keys.entrySet()) {
    500             newKeys[index++] = entry.getKey();
    501             newKeys[index++] = entry.getValue();
     501            newKeys[index++] = Objects.requireNonNull(entry.getKey());
     502            newKeys[index++] = Objects.requireNonNull(entry.getValue());
    502503        }
    503504        this.keys = newKeys;
Note: See TracChangeset for help on using the changeset viewer.