[jboss-remoting-commits] JBoss Remoting SVN: r6185 - remoting2/branches/2.2/src/tests/org/jboss/test/remoting/connection/identity.

jboss-remoting-commits at lists.jboss.org jboss-remoting-commits at lists.jboss.org
Sat Dec 18 13:36:02 EST 2010


Author: ron.sigal at jboss.com
Date: 2010-12-18 13:36:02 -0500 (Sat, 18 Dec 2010)
New Revision: 6185

Modified:
   remoting2/branches/2.2/src/tests/org/jboss/test/remoting/connection/identity/ServerIdentityTestCase.java
Log:
JBREM-1144: Ignore ConcurrentModificationException when shutting down ServerThreads.

Modified: remoting2/branches/2.2/src/tests/org/jboss/test/remoting/connection/identity/ServerIdentityTestCase.java
===================================================================
--- remoting2/branches/2.2/src/tests/org/jboss/test/remoting/connection/identity/ServerIdentityTestCase.java	2010-12-18 18:26:53 UTC (rev 6184)
+++ remoting2/branches/2.2/src/tests/org/jboss/test/remoting/connection/identity/ServerIdentityTestCase.java	2010-12-18 18:36:02 UTC (rev 6185)
@@ -23,6 +23,7 @@
 
 import java.lang.reflect.Field;
 import java.net.InetAddress;
+import java.util.ConcurrentModificationException;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.Map;
@@ -254,9 +255,16 @@
          Iterator it = threads.iterator();
          while (it.hasNext())
          {
-            ServerThread t = (ServerThread) it.next();
-            ServerSocketWrapper socketWrapper = (ServerSocketWrapper) socketWrapperField.get(t);
-            socketWrapper.close();
+            try
+            {
+               ServerThread t = (ServerThread) it.next();
+               ServerSocketWrapper socketWrapper = (ServerSocketWrapper) socketWrapperField.get(t);
+               socketWrapper.close();
+            }
+            catch (ConcurrentModificationException e)
+            {
+               log.info(this + " caught " + e.getMessage());
+            }
          }
          connector.stop();
       }



More information about the jboss-remoting-commits mailing list