Add log statements to Roster

This commit is contained in:
Florian Schmaus 2014-04-29 14:52:03 +02:00
parent 6e12409b82
commit 10e82fae45
1 changed files with 3 additions and 0 deletions

View File

@ -1043,12 +1043,15 @@ public class Roster {
String jid = StringUtils.parseBareAddress(connection.getUser());
if (rosterPacket.getFrom() != null &&
!rosterPacket.getFrom().equals(jid)) {
LOGGER.warning("Ignoring roster push with a non matching 'from' ourJid=" + jid
+ " from=" + rosterPacket.getFrom());
return;
}
// A roster push must contain exactly one entry
Collection<Item> items = rosterPacket.getRosterItems();
if (items.size() != 1) {
LOGGER.warning("Ignoring roster push with not exaclty one entry. size=" + items.size());
return;
}