Commit 518dcd4e authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gaston

Fixed concurrency problem. JM-277


git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@1308 b35dd754-fafc-0310-a699-88a17e54d16e
parent 5dcee39c
...@@ -391,12 +391,13 @@ public class Group implements Cacheable { ...@@ -391,12 +391,13 @@ public class Group implements Cacheable {
if (current == null) { if (current == null) {
throw new IllegalStateException(); throw new IllegalStateException();
} }
deleteProperty((String)current.getKey()); String key = (String)current.getKey();
deleteProperty(key);
iter.remove(); iter.remove();
// Fire event. // Fire event.
Map params = new HashMap(); Map params = new HashMap();
params.put("type", "propertyDeleted"); params.put("type", "propertyDeleted");
params.put("propertyKey", current.getKey()); params.put("propertyKey", key);
GroupEventDispatcher.dispatchEvent(Group.this, GroupEventDispatcher.dispatchEvent(Group.this,
GroupEventDispatcher.EventType.group_modified, params); GroupEventDispatcher.EventType.group_modified, params);
} }
......
...@@ -347,12 +347,13 @@ public class User implements Cacheable { ...@@ -347,12 +347,13 @@ public class User implements Cacheable {
if (current == null) { if (current == null) {
throw new IllegalStateException(); throw new IllegalStateException();
} }
deleteProperty((String)current.getKey()); String key = (String)current.getKey();
deleteProperty(key);
iter.remove(); iter.remove();
// Fire event. // Fire event.
Map params = new HashMap(); Map params = new HashMap();
params.put("type", "propertyDeleted"); params.put("type", "propertyDeleted");
params.put("propertyKey", current.getKey()); params.put("propertyKey", key);
UserEventDispatcher.dispatchEvent(User.this, UserEventDispatcher.dispatchEvent(User.this,
UserEventDispatcher.EventType.user_modified, params); UserEventDispatcher.EventType.user_modified, params);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment