Ignore:
Timestamp:
2011-08-31T17:15:24+02:00 (13 years ago)
Author:
bastiK
Message:

fixed #6746 - paste properties in new layer results in nullpointer exception

File:
1 edited

Legend:

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

    r4172 r4387  
    11// License: GPL. For details, see LICENSE file.
    22package org.openstreetmap.josm.data.osm;
     3
    34import static org.openstreetmap.josm.tools.I18n.marktr;
    45import static org.openstreetmap.josm.tools.I18n.tr;
    56
    67import java.text.MessageFormat;
     8import java.util.Arrays;
     9import java.util.Collection;
    710
    811public enum OsmPrimitiveType {
     
    1518    CLOSEDWAY  (marktr(/* ICON(data/) */"closedway"), null, WayData.class),
    1619    MULTIPOLYGON (marktr(/* ICON(data/) */"multipolygon"), null, RelationData.class);
     20
     21    private final static Collection<OsmPrimitiveType> DATA_VALUES = Arrays.asList(NODE, WAY, RELATION);
    1722
    1823    private final String apiTypeName;
     
    6166    }
    6267
     68    public static Collection<OsmPrimitiveType> dataValues() {
     69        return DATA_VALUES;
     70    }
     71
    6372    public OsmPrimitive newInstance(long uniqueId, boolean allowNegative) {
    6473        switch (this) {
Note: See TracChangeset for help on using the changeset viewer.