Changeset 2471 in josm for trunk/src/org/openstreetmap/josm/data/osm/User.java
- Timestamp:
- 2009-11-18T18:50:38+01:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/User.java
r2455 r2471 7 7 import java.util.HashMap; 8 8 import java.util.List; 9 import java.util.concurrent.atomic.AtomicLong; 9 10 10 11 /** … … 18 19 */ 19 20 public class User { 20 static private long uidCounter = 0; 21 22 static private AtomicLong uidCounter = new AtomicLong(); 23 21 24 /** 22 25 * the map of known users … … 27 30 private static long getNextLocalUid() { 28 31 synchronized(User.class) { 29 uidCounter--; 30 return uidCounter; 32 return uidCounter.decrementAndGet(); 31 33 } 32 34 } … … 60 62 } 61 63 64 /** 65 * clears the static map of user ids to user objects 66 * 67 */ 68 public static void clearUserMap() { 69 userMap.clear(); 70 } 62 71 63 72 /**
Note:
See TracChangeset
for help on using the changeset viewer.