Permalink
Browse files

really, tolerate RosterManager's absense

git-svn-id: https://svn.apache.org/repos/asf/mina/vysper/trunk@1347645 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information...
1 parent 4c20a4d commit 0667d78ad6115c89f2c2067089bfa1ca52075fbc Bernd Fondermann committed Jun 7, 2012
View
3 server/core/src/main/java/org/apache/vysper/xmpp/modules/roster/RosterUtils.java
@@ -53,7 +53,6 @@
* are needed and then all TO items - but the roster is only iterated once.
*/
public static Map<SubscriptionType, List<RosterItem>> getRosterItemsByState(RosterManager rosterManager, Entity user) {
- if (rosterManager == null) return Collections.emptyMap();
Map<SubscriptionType, List<RosterItem>> rosterItemMap = new HashMap<SubscriptionType, List<RosterItem>>();
@@ -63,6 +62,8 @@
rosterItemMap.put(SubscriptionType.REMOVE, new ArrayList<RosterItem>());
rosterItemMap.put(SubscriptionType.NONE, new ArrayList<RosterItem>());
+ if (rosterManager == null) return rosterItemMap;
+
Roster roster;
try {
roster = rosterManager.retrieve(user);

0 comments on commit 0667d78

Please sign in to comment.