Changeset 2300 in josm


Ignore:
Timestamp:
2009-10-18T20:19:40+02:00 (15 years ago)
Author:
jttt
Message:

Fix id generator: getAndDecrement() -> decrementAndGet()

File:
1 edited

Legend:

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

    r2299 r2300  
    3636abstract public class OsmPrimitive implements Comparable<OsmPrimitive>, Tagged {
    3737
    38     private static AtomicLong idCounter = new AtomicLong(0);
     38    static final AtomicLong idCounter = new AtomicLong(0);
    3939
    4040    private static final int FLAG_MODIFIED = 1 << 0;
     
    400400     */
    401401    public void clearOsmId() {
    402         this.id = idCounter.getAndDecrement();
     402        this.id = idCounter.decrementAndGet();
    403403        this.version = 0;
    404404        this.incomplete = false;
     
    487487    /**
    488488     * Replies the user who has last touched this object. May be null.
    489      * 
     489     *
    490490     * @return the user who has last touched this object. May be null.
    491491     */
     
    496496    /**
    497497     * Sets the user who has last touched this object.
    498      * 
     498     *
    499499     * @param user the user
    500500     */
Note: See TracChangeset for help on using the changeset viewer.