activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r639667 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/NetworkConnector.java
Date Fri, 21 Mar 2008 15:30:01 GMT
Author: chirino
Date: Fri Mar 21 08:29:55 2008
New Revision: 639667

URL: http://svn.apache.org/viewvc?rev=639667&view=rev
Log:


Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/NetworkConnector.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/NetworkConnector.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/NetworkConnector.java?rev=639667&r1=639666&r2=639667&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/NetworkConnector.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/NetworkConnector.java
Fri Mar 21 08:29:55 2008
@@ -19,6 +19,7 @@
 import java.net.URI;
 import java.net.URISyntaxException;
 import java.util.HashMap;
+import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
@@ -173,8 +174,16 @@
         dests = destsList.toArray(new ActiveMQDestination[destsList.size()]);
         result.setStaticallyIncludedDestinations(dests);
         if (durableDestinations != null) {
-            ActiveMQDestination[] dest = new ActiveMQDestination[durableDestinations.size()];
-            dest = (ActiveMQDestination[])durableDestinations.toArray(dest);
+            
+            HashSet<ActiveMQDestination> topics = new HashSet<ActiveMQDestination>();
+            for (ActiveMQDestination d : durableDestinations) {
+                if( d.isTopic() ) {
+                    topics.add(d);
+                }
+            }
+            
+            ActiveMQDestination[] dest = new ActiveMQDestination[topics.size()];
+            dest = (ActiveMQDestination[])topics.toArray(dest);
             result.setDurableDestinations(dest);
         }
         return result;



Mime
View raw message