SMACK-290: Fix deadlock while initializing roster

git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@11620 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
Günther Niess 2010-02-11 14:26:28 +00:00 committed by niess
parent 539f652443
commit 691c433b3a
1 changed files with 4 additions and 2 deletions

View File

@ -833,8 +833,10 @@ public class Roster {
// Find the list of groups that the user currently belongs to.
List<String> currentGroupNames = new ArrayList<String>();
for (RosterGroup rosterGroup : entry.getGroups()) {
currentGroupNames.add(rosterGroup.getName());
for (RosterGroup group: getGroups()) {
if (group.contains(entry)) {
currentGroupNames.add(group.getName());
}
}
// If the packet is not of the type REMOVE then add the entry to the groups