Author: xor
Date: 2008-11-11 12:52:44 +0000 (Tue, 11 Nov 2008)
New Revision: 23484

Modified:
   trunk/plugins/WoT/Identity.java
Log:
addContext() bugfix: Only update() and store() if the context was not present 
yet.

Modified: trunk/plugins/WoT/Identity.java
===================================================================
--- trunk/plugins/WoT/Identity.java     2008-11-11 12:51:09 UTC (rev 23483)
+++ trunk/plugins/WoT/Identity.java     2008-11-11 12:52:44 UTC (rev 23484)
@@ -656,9 +656,11 @@
        public void addContext(String context, ObjectContainer db) throws 
InvalidParameterException {
                String newContext = context.trim();
                if(newContext.length() == 0) throw new 
InvalidParameterException("Blank context");
-               if(!contexts.contains(newContext)) contexts.add(newContext);
-               db.store(contexts);
-               updated();
+               if(!contexts.contains(newContext)) {
+                       contexts.add(newContext);
+                       updated();
+                       db.store(contexts);
+               }
        }
        
        /**

_______________________________________________
cvs mailing list
[email protected]
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs

Reply via email to