From 691c433b3a1afe2ca913d31bdbe2620209c583d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCnther=20Niess?= Date: Thu, 11 Feb 2010 14:26:28 +0000 Subject: [PATCH] SMACK-290: Fix deadlock while initializing roster git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@11620 b35dd754-fafc-0310-a699-88a17e54d16e --- source/org/jivesoftware/smack/Roster.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/org/jivesoftware/smack/Roster.java b/source/org/jivesoftware/smack/Roster.java index 5eebcba3d..1ba793aef 100644 --- a/source/org/jivesoftware/smack/Roster.java +++ b/source/org/jivesoftware/smack/Roster.java @@ -833,8 +833,10 @@ public class Roster { // Find the list of groups that the user currently belongs to. List currentGroupNames = new ArrayList(); - 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