Use contains(BareJid) instead of entries.containsKey in Roster

This commit is contained in:
Florian Schmaus 2015-12-01 18:08:54 +01:00
parent 3c2dd9b9e6
commit a5e9037907
1 changed files with 3 additions and 3 deletions

View File

@ -1318,7 +1318,7 @@ public final class Roster extends Manager {
// Add the new presence, using the resources as a key.
userPresences.put(fromResource, presence);
// If the user is in the roster, fire an event.
if (entries.containsKey(key)) {
if (contains(key)) {
fireRosterPresenceEvent(presence);
}
break;
@ -1339,7 +1339,7 @@ public final class Roster extends Manager {
userPresences.put(fromResource, presence);
}
// If the user is in the roster, fire an event.
if (entries.containsKey(key)) {
if (contains(key)) {
fireRosterPresenceEvent(presence);
}
break;
@ -1359,7 +1359,7 @@ public final class Roster extends Manager {
// Set the new presence using the empty resource as a key.
userPresences.put(Resourcepart.EMPTY, presence);
// If the user is in the roster, fire an event.
if (entries.containsKey(key)) {
if (contains(key)) {
fireRosterPresenceEvent(presence);
}
break;