Prevents adding items to groups with no name (NULL)

git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@2239 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
Gaston Dombiak 2004-03-11 14:33:48 +00:00 committed by gdombiak
parent a8eeb87a64
commit 777f8937e4
1 changed files with 4 additions and 2 deletions

View File

@ -248,7 +248,7 @@ public class Roster {
}
/**
* Cretaes a new roster entry and prsence subscription. The server will asynchronously
* Creates a new roster entry and presence subscription. The server will asynchronously
* update the roster with the subscription status.
*
* @param user the user.
@ -263,7 +263,9 @@ public class Roster {
RosterPacket.Item item = new RosterPacket.Item(user, name);
if (groups != null) {
for (int i=0; i<groups.length; i++) {
item.addGroupName(groups[i]);
if (groups[i] != null) {
item.addGroupName(groups[i]);
}
}
}
rosterPacket.addRosterItem(item);