Ignore:
Timestamp:
2009-11-08T15:19:50+01:00 (14 years ago)
Author:
jttt
Message:

Add clearId parameter to primitives copy constructor, replace some clearOsmId calls, throw exception if id is set after primitive was added to the dataset

File:
1 edited

Legend:

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

    r2070 r2410  
    66import java.util.ArrayList;
    77import java.util.Collection;
     8import java.util.List;
    89import java.util.logging.Logger;
    910
     
    2526
    2627    /** the node to undelete */
    27     private ArrayList<OsmPrimitive> toUndelete;
     28    private final List<OsmPrimitive> toUndelete = new ArrayList<OsmPrimitive>();
    2829
    29     protected UndeletePrimitivesCommand() {
    30         toUndelete = new ArrayList<OsmPrimitive>();
    31     }
    3230    /**
    3331     * constructor
     
    3533     */
    3634    public UndeletePrimitivesCommand(OsmPrimitive node) {
    37         this();
    3835        toUndelete.add(node);
    3936    }
     
    4441     */
    4542    public UndeletePrimitivesCommand(OsmPrimitive ... toUndelete) {
    46         this();
    4743        for (int i=0; i < toUndelete.length; i++) {
    4844            this.toUndelete.add(toUndelete[i]);
Note: See TracChangeset for help on using the changeset viewer.