Commit fd326e6a authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gato

Fixed IllegalStateException. JM-563

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk@3426 b35dd754-fafc-0310-a699-88a17e54d16e
parent 28b8bd32
......@@ -11,13 +11,13 @@
package org.jivesoftware.wildfire.roster;
import org.jivesoftware.util.IntEnum;
import org.jivesoftware.util.Cacheable;
import org.jivesoftware.util.CacheSizes;
import org.jivesoftware.util.Cacheable;
import org.jivesoftware.util.IntEnum;
import org.jivesoftware.wildfire.SharedGroupException;
import org.jivesoftware.wildfire.group.Group;
import org.jivesoftware.wildfire.group.GroupManager;
import org.jivesoftware.wildfire.group.GroupNotFoundException;
import org.jivesoftware.wildfire.group.Group;
import org.jivesoftware.wildfire.SharedGroupException;
import org.xmpp.packet.JID;
import java.util.*;
......@@ -335,8 +335,11 @@ public class RosterItem implements Cacheable {
String displayName = group.getProperties().get("sharedRoster.displayName");
if (displayName != null && displayName.equals(groupName)) {
// Remove the shared group from the list (since it exists)
try {
it.remove();
}
catch (IllegalStateException e) {}
}
}
catch (GroupNotFoundException e) {
// Check now if there is a group whose display name matches the requested group
......@@ -345,8 +348,11 @@ public class RosterItem implements Cacheable {
String displayName = group.getProperties().get("sharedRoster.displayName");
if (displayName != null && displayName.equals(groupName)) {
// Remove the shared group from the list (since it exists)
try {
it.remove();
}
catch (IllegalStateException ise) {}
}
}
}
}
......
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