incubator-lokahi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tob...@apache.org
Subject svn commit: r462933 - /incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/core/api/user/User.java
Date Wed, 11 Oct 2006 20:29:41 GMT
Author: toback
Date: Wed Oct 11 13:29:40 2006
New Revision: 462933

URL: http://svn.apache.org/viewvc?view=rev&rev=462933
Log:
Applied patch - Re: http://mail-archives.apache.org/mod_mbox/incubator-lokahi-dev/200610.mbox/%3c4A8D83183E9E3F41A16C2A1B4CA3F6EA0188A8@usctmx1134.merck.com%3e

Modified:
    incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/core/api/user/User.java

Modified: incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/core/api/user/User.java
URL: http://svn.apache.org/viewvc/incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/core/api/user/User.java?view=diff&rev=462933&r1=462932&r2=462933
==============================================================================
--- incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/core/api/user/User.java (original)
+++ incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/core/api/user/User.java Wed Oct
11 13:29:40 2006
@@ -463,10 +463,14 @@
     Collection<Project> keepers = new TMCSet<Project>();
     keepers.addAll(oldProjects);
     keepers.retainAll(newProjects);
-    newProjects.removeAll(keepers);
+    if (newProjects != null)
+    	newProjects.removeAll(keepers);
+    
     oldProjects.removeAll(keepers);
-    u.removeProject(oldProjects);
-    u.addProject(newProjects);
+    if (!oldProjects.isEmpty())
+    	u.removeProject(oldProjects);
+    if (newProjects != null)
+    	u.addProject(newProjects);
   }
 
   public static User store(User u) throws SQLException {



Mime
View raw message