Use getPresenceMapKey() in Roster.getEntry()

In order to use the bare JID as key for the entries Map if no entry for
the full JID exists already, otherwise use the full JID.
This commit is contained in:
Florian Schmaus 2015-01-19 18:36:31 +01:00
parent 8c9b3d5c62
commit b06c3e3607
1 changed files with 3 additions and 2 deletions

View File

@ -448,7 +448,8 @@ public class Roster {
if (user == null) {
return null;
}
return entries.get(user.toLowerCase(Locale.US));
String key = getPresenceMapKey(user);
return entries.get(key);
}
/**
@ -714,7 +715,7 @@ public class Roster {
return null;
}
String key = user;
if (!contains(user)) {
if (!entries.containsKey(user)) {
key = XmppStringUtils.parseBareJid(user);
}
return key.toLowerCase(Locale.US);