[hornetq-commits] JBoss hornetq SVN: r10999 - branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/server/cluster/impl.

do-not-reply at jboss.org do-not-reply at jboss.org
Mon Jul 18 21:18:12 EDT 2011


Author: clebert.suconic at jboss.com
Date: 2011-07-18 21:18:12 -0400 (Mon, 18 Jul 2011)
New Revision: 10999

Modified:
   branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/server/cluster/impl/ClusterConnectionImpl.java
Log:
fixing a test

Modified: branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/server/cluster/impl/ClusterConnectionImpl.java
===================================================================
--- branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/server/cluster/impl/ClusterConnectionImpl.java	2011-07-19 01:14:41 UTC (rev 10998)
+++ branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/server/cluster/impl/ClusterConnectionImpl.java	2011-07-19 01:18:12 UTC (rev 10999)
@@ -378,15 +378,18 @@
 
    public synchronized Map<String, String> getNodes()
    {
-      Map<String, String> nodes = new HashMap<String, String>();
-      for (Entry<String, MessageFlowRecord> record : records.entrySet())
+      synchronized (records)
       {
-         if (record.getValue().getBridge().getForwardingConnection() != null)
+         Map<String, String> nodes = new HashMap<String, String>();
+         for (Entry<String, MessageFlowRecord> record : records.entrySet())
          {
-            nodes.put(record.getKey(), record.getValue().getBridge().getForwardingConnection().getRemoteAddress());
+            if (record.getValue().getBridge().getForwardingConnection() != null)
+            {
+               nodes.put(record.getKey(), record.getValue().getBridge().getForwardingConnection().getRemoteAddress());
+            }
          }
+         return nodes;
       }
-      return nodes;
    }
 
    public synchronized void activate() throws Exception



More information about the hornetq-commits mailing list