1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-12-27 14:47:59 +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:
Alex Wenckus 2006-04-20 18:52:28 +00:00 committed by alex
parent 912e8ad25e
commit bd6b9e6b26

View file

@ -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>");