Commit 496dfb3f authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gaston

Fixes possible NPE while loading the properties.


git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@119 b35dd754-fafc-0310-a699-88a17e54d16e
parent 004b10ea
...@@ -443,12 +443,14 @@ public class MultiUserChatServerImpl extends BasicModule implements MultiUserCha ...@@ -443,12 +443,14 @@ public class MultiUserChatServerImpl extends BasicModule implements MultiUserCha
// Trigger the strategy to load itself from the context // Trigger the strategy to load itself from the context
historyStrategy.setContext("xmpp.muc.history"); historyStrategy.setContext("xmpp.muc.history");
// Load the list of JIDs that are sysadmins of the MUC service // Load the list of JIDs that are sysadmins of the MUC service
String[] jids = JiveGlobals.getProperty("xmpp.muc.sysadmin.jid").split(","); String property = JiveGlobals.getProperty("xmpp.muc.sysadmin.jid");
String[] jids = (property != null ? property.split(",") : new String[]{""});
for (int i = 0; i < jids.length; i++) { for (int i = 0; i < jids.length; i++) {
sysadmins.add(jids[i].trim().toLowerCase()); sysadmins.add(jids[i].trim().toLowerCase());
} }
// Load the list of JIDs that are allowed to create a MUC room // Load the list of JIDs that are allowed to create a MUC room
jids = JiveGlobals.getProperty("xmpp.muc.create.jid").split(","); property = JiveGlobals.getProperty("xmpp.muc.create.jid");
jids = (property != null ? property.split(",") : new String[]{""});
for (int i = 0; i < jids.length; i++) { for (int i = 0; i < jids.length; i++) {
allowedToCreate.add(jids[i].trim().toLowerCase()); allowedToCreate.add(jids[i].trim().toLowerCase());
} }
......
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