Commit 11e7ac06 authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gato

Fixed NPE when display name is null. JM-552

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk@3383 b35dd754-fafc-0310-a699-88a17e54d16e
parent be4da6e7
...@@ -333,7 +333,7 @@ public class RosterItem implements Cacheable { ...@@ -333,7 +333,7 @@ public class RosterItem implements Cacheable {
Group group = GroupManager.getInstance().getGroup(groupName); Group group = GroupManager.getInstance().getGroup(groupName);
// Get the display name of the group // Get the display name of the group
String displayName = group.getProperties().get("sharedRoster.displayName"); String displayName = group.getProperties().get("sharedRoster.displayName");
if (displayName.equals(groupName)) { if (displayName != null && displayName.equals(groupName)) {
// Remove the shared group from the list (since it exists) // Remove the shared group from the list (since it exists)
it.remove(); it.remove();
} }
...@@ -343,7 +343,7 @@ public class RosterItem implements Cacheable { ...@@ -343,7 +343,7 @@ public class RosterItem implements Cacheable {
for (Group group : existingGroups) { for (Group group : existingGroups) {
// Get the display name of the group // Get the display name of the group
String displayName = group.getProperties().get("sharedRoster.displayName"); String displayName = group.getProperties().get("sharedRoster.displayName");
if (displayName.equals(groupName)) { if (displayName != null && displayName.equals(groupName)) {
// Remove the shared group from the list (since it exists) // Remove the shared group from the list (since it exists)
it.remove(); it.remove();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment