Changeset 3505 in josm


Ignore:
Timestamp:
2010-09-01T17:53:56+02:00 (12 years ago)
Author:
stoecker
Message:

fix #5402 - creates different users for same name when no OSM id given

File:
1 edited

Legend:

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

    r3262 r3505  
    3636     */
    3737    public static User createLocalUser(String name) {
     38        for(long i = -1; i >= uidCounter.get(); --i)
     39        {
     40          User olduser = getById(i);
     41          if(olduser != null && olduser.hasName(name))
     42            return olduser;
     43        }
    3844        User user = new User(getNextLocalUid(), name);
    3945        userMap.put(user.getId(), user);
Note: See TracChangeset for help on using the changeset viewer.