Index: trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java	(revision 2299)
+++ trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java	(revision 2300)
@@ -36,5 +36,5 @@
 abstract public class OsmPrimitive implements Comparable<OsmPrimitive>, Tagged {
 
-    private static AtomicLong idCounter = new AtomicLong(0);
+    static final AtomicLong idCounter = new AtomicLong(0);
 
     private static final int FLAG_MODIFIED = 1 << 0;
@@ -400,5 +400,5 @@
      */
     public void clearOsmId() {
-        this.id = idCounter.getAndDecrement();
+        this.id = idCounter.decrementAndGet();
         this.version = 0;
         this.incomplete = false;
@@ -487,5 +487,5 @@
     /**
      * Replies the user who has last touched this object. May be null.
-     * 
+     *
      * @return the user who has last touched this object. May be null.
      */
@@ -496,5 +496,5 @@
     /**
      * Sets the user who has last touched this object.
-     * 
+     *
      * @param user the user
      */
