From bd6b9e6b26f6560533a854a5708601de73f75ee3 Mon Sep 17 00:00:00 2001 From: Alex Wenckus Date: Thu, 20 Apr 2006 18:52:28 +0000 Subject: [PATCH] 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 --- source/org/jivesoftware/smack/packet/RosterPacket.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/source/org/jivesoftware/smack/packet/RosterPacket.java b/source/org/jivesoftware/smack/packet/RosterPacket.java index 30048b7c3..88ac2966d 100644 --- a/source/org/jivesoftware/smack/packet/RosterPacket.java +++ b/source/org/jivesoftware/smack/packet/RosterPacket.java @@ -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").append(groupName).append(""); + buf.append("").append(StringUtils.escapeForXML(groupName)).append(""); } } buf.append("");