Ignore:
Timestamp:
2016-07-28T01:24:39+02:00 (8 years ago)
Author:
Don-vip
Message:

fix #13223 - Minor command class fixes (patch by michael2402, modified) - gsoc-core

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/command/SelectCommand.java

    r10364 r10663  
    55
    66import java.util.Collection;
     7import java.util.Collections;
     8import java.util.HashSet;
    79import java.util.Objects;
    810
     
    2830     */
    2931    public SelectCommand(Collection<OsmPrimitive> newSelection) {
    30         this.newSelection = newSelection;
     32        if (newSelection == null || newSelection.isEmpty()) {
     33            this.newSelection = Collections.emptySet();
     34        } else {
     35            this.newSelection = new HashSet<>(newSelection);
     36        }
    3137    }
    3238
Note: See TracChangeset for help on using the changeset viewer.