Commit 472821e5 authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gato

Fixed NPE.

git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/trunk@8357 b35dd754-fafc-0310-a699-88a17e54d16e
parent c9b0c8f3
...@@ -3,11 +3,11 @@ package org.apache.mina.management; ...@@ -3,11 +3,11 @@ package org.apache.mina.management;
import org.apache.mina.common.*; import org.apache.mina.common.*;
import org.apache.mina.filter.executor.ExecutorFilter; import org.apache.mina.filter.executor.ExecutorFilter;
import java.net.SocketAddress;
import java.util.Queue; import java.util.Queue;
import java.util.Iterator; import java.util.Set;
import java.util.concurrent.atomic.AtomicLong;
import java.util.concurrent.ConcurrentLinkedQueue; import java.util.concurrent.ConcurrentLinkedQueue;
import java.net.SocketAddress; import java.util.concurrent.atomic.AtomicLong;
/** /**
* Collects statistics of an {@link org.apache.mina.common.IoService}. It's polling all the sessions of a given * Collects statistics of an {@link org.apache.mina.common.IoService}. It's polling all the sessions of a given
...@@ -115,14 +115,12 @@ public class MINAStatCollector { ...@@ -115,14 +115,12 @@ public class MINAStatCollector {
polledSessions = new ConcurrentLinkedQueue<IoSession>(); polledSessions = new ConcurrentLinkedQueue<IoSession>();
for ( Iterator iter = service.getManagedServiceAddresses().iterator(); iter.hasNext(); ) Set<SocketAddress> addresses = service.getManagedServiceAddresses();
{ if (addresses != null) {
SocketAddress element = ( SocketAddress ) iter.next(); for (SocketAddress element : addresses) {
for (IoSession ioSession : service.getManagedSessions(element)) {
for ( Iterator iter2 = service.getManagedSessions( element ).iterator(); iter2.hasNext(); ) addSession(ioSession);
{ }
addSession( ( IoSession ) iter2.next() );
} }
} }
......
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