Commit e17c67aa authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gaston

Event was being triggered before actually setting the new property value.


git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@841 b35dd754-fafc-0310-a699-88a17e54d16e
parent 61bb3b3c
......@@ -306,8 +306,10 @@ public class Group implements Cacheable {
private class PropertiesMap extends AbstractMap {
public Object put(Object key, Object value) {
Object answer;
if (properties.containsKey(key)) {
String originalValue = properties.get(key);
answer = properties.put((String)key, (String)value);
updateProperty((String)key, (String)value);
// Fire event.
Map params = new HashMap();
......@@ -318,6 +320,7 @@ public class Group implements Cacheable {
GroupEventDispatcher.EventType.group_modified, params);
}
else {
answer = properties.put((String)key, (String)value);
insertProperty((String)key, (String)value);
// Fire event.
Map params = new HashMap();
......@@ -326,7 +329,7 @@ public class Group implements Cacheable {
GroupEventDispatcher.dispatchEvent(Group.this,
GroupEventDispatcher.EventType.group_modified, params);
}
return properties.put((String)key, (String)value);
return answer;
}
public Set<Entry> entrySet() {
......
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