Ignore:
Timestamp:
2013-08-11T21:09:08+02:00 (11 years ago)
Author:
Don-vip
Message:

fix #8951 - fix clearing of primitive metadata

File:
1 edited

Legend:

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

    r6069 r6140  
    383383
    384384    /**
    385      * Clears the id and version known to the OSM API. The id and the version is set to 0.
    386      * incomplete is set to false. It's preferred to use copy constructor with clearId set to true instead
    387      * of calling this method.
     385     * Clears the metadata, including id and version known to the OSM API.
     386     * The id is a new unique id. The version, changeset and timestamp are set to 0.
     387     * incomplete and deleted are set to false. It's preferred to use copy constructor with clearMetadata set to true instead
    388388     *
    389389     * <strong>Caution</strong>: Do not use this method on primitives which are already added to a {@link DataSet}.
    390390     *
    391391     * @throws DataIntegrityProblemException If primitive was already added to the dataset
    392      */
    393     @Override
    394     public void clearOsmId() {
     392     * @since 6140
     393     */
     394    @Override
     395    public void clearOsmMetadata() {
    395396        if (dataSet != null)
    396397            throw new DataIntegrityProblemException("Method cannot be called after primitive was added to the dataset");
    397         super.clearOsmId();
     398        super.clearOsmMetadata();
    398399    }
    399400
Note: See TracChangeset for help on using the changeset viewer.