mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-26 14:02:06 +01:00
1) Illegal characters in group name will no longer crash a connection. SMACK-133
2) Fixed warnings. git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@3811 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
parent
912e8ad25e
commit
bd6b9e6b26
1 changed files with 5 additions and 3 deletions
|
@ -20,6 +20,8 @@
|
|||
|
||||
package org.jivesoftware.smack.packet;
|
||||
|
||||
import org.jivesoftware.smack.util.StringUtils;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
|
@ -29,7 +31,7 @@ import java.util.*;
|
|||
*/
|
||||
public class RosterPacket extends IQ {
|
||||
|
||||
private List rosterItems = new ArrayList();
|
||||
private final List rosterItems = new ArrayList();
|
||||
|
||||
/**
|
||||
* Adds a roster item to the packet.
|
||||
|
@ -88,7 +90,7 @@ public class RosterPacket extends IQ {
|
|||
private String name;
|
||||
private ItemType itemType;
|
||||
private ItemStatus itemStatus;
|
||||
private List groupNames;
|
||||
private final List groupNames;
|
||||
|
||||
/**
|
||||
* Creates a new roster item.
|
||||
|
@ -219,7 +221,7 @@ public class RosterPacket extends IQ {
|
|||
synchronized (groupNames) {
|
||||
for (int i=0; i<groupNames.size(); i++) {
|
||||
String groupName = (String)groupNames.get(i);
|
||||
buf.append("<group>").append(groupName).append("</group>");
|
||||
buf.append("<group>").append(StringUtils.escapeForXML(groupName)).append("</group>");
|
||||
}
|
||||
}
|
||||
buf.append("</item>");
|
||||
|
|
Loading…
Reference in a new issue