Commit 8e223368 authored by Dave Cridland's avatar Dave Cridland Committed by daryl herzmann

OF-1137 Check room is not null before logging (#697)

parent 8a8f2963
......@@ -803,15 +803,17 @@ public class MultiUserChatServiceImpl implements Component, MultiUserChatService
private void removeChatRoom(String roomName, boolean notify) {
MUCRoom room = localMUCRoomManager.removeRoom(roomName);
Log.info("removing chat room:" + roomName + "|" + room.getClass().getName());
if (room instanceof LocalMUCRoom)
GroupEventDispatcher.removeListener((LocalMUCRoom) room);
if (room != null) {
totalChatTime += room.getChatLength();
Log.info("removing chat room:" + roomName + "|" + room.getClass().getName());
if (room instanceof LocalMUCRoom)
GroupEventDispatcher.removeListener((LocalMUCRoom) room);
totalChatTime += room.getChatLength();
if (notify) {
// Notify other cluster nodes that a room has been removed
CacheFactory.doClusterTask(new RoomRemovedEvent((LocalMUCRoom)room));
}
} else {
Log.info("No chatroom {} during removal.", roomName);
}
}
......
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