Index: /trunk/src/org/openstreetmap/josm/data/osm/User.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/osm/User.java	(revision 2637)
+++ /trunk/src/org/openstreetmap/josm/data/osm/User.java	(revision 2638)
@@ -2,8 +2,7 @@
 package org.openstreetmap.josm.data.osm;
 
-import static org.openstreetmap.josm.tools.I18n.tr;
-
 import java.util.ArrayList;
 import java.util.HashMap;
+import java.util.HashSet;
 import java.util.List;
 import java.util.concurrent.atomic.AtomicLong;
@@ -56,6 +55,5 @@
             userMap.put(user.getId(), user);
         }
-        if (!user.getName().equals(name))
-            throw new DataIntegrityProblemException(tr("User with the same uid but different name found"));
+        user.addName(name);
         return user;
     }
@@ -93,5 +91,5 @@
         List<User> ret = new ArrayList<User>();
         for (User user: userMap.values()) {
-            if (user.getName().equals(name)) {
+            if (user.hasName(name)) {
                 ret.add(user);
             }
@@ -101,5 +99,5 @@
 
     /** the user name */
-    private final String name;
+    private final HashSet<String> names = new HashSet<String>();
     /** the user id */
     private final long uid;
@@ -111,5 +109,38 @@
      */
     public String getName() {
-        return name;
+        StringBuilder sb = new StringBuilder();
+        for (String name: names) {
+            sb.append(name);
+            sb.append('/');
+        }
+        sb.deleteCharAt(sb.length() - 1);
+        return sb.toString();
+    }
+
+    /*
+     * Returns the list of user names
+     * 
+     * @returns list of names
+     */
+    public ArrayList<String> getNames() {
+        return new ArrayList<String>(names);
+    }
+
+    /*
+     * Adds a user name to the list if it is not there, yet.
+     * 
+     * @param name
+     */
+    public void addName(String name) {
+        names.add(name);
+    }
+
+    /*
+     * Returns true if the name is in the names list
+     * 
+     * @param name
+     */
+    public boolean hasName(String name) {
+        return names.contains(name);
     }
 
@@ -130,8 +161,6 @@
     private User(long uid, String name) {
         this.uid = uid;
-        if (name == null) {
-            this.name = "";
-        } else {
-            this.name = name;
+        if (name != null) {
+            addName(name);
         }
     }
@@ -149,5 +178,5 @@
         final int prime = 31;
         int result = 1;
-        result = prime * result + name.hashCode();
+        result = prime * result + getName().hashCode();
         result = prime * result + (int) (uid ^ (uid >>> 32));
         return result;
@@ -156,13 +185,10 @@
     @Override
     public boolean equals(Object obj) {
-        if (obj instanceof User) {
-            User other = (User) obj;
-            if (!name.equals(other.name))
-                return false;
-            if (uid != other.uid)
-                return false;
-            return true;
-        } else
+        if (! (obj instanceof User))
             return false;
+        User other = (User) obj;
+        if (uid != other.uid)
+            return false;
+        return true;
     }
 }
