activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r732184 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/DestinationFilter.java
Date Tue, 06 Jan 2009 23:52:36 GMT
Author: djencks
Date: Tue Jan  6 15:52:36 2009
New Revision: 732184

URL: http://svn.apache.org/viewvc?rev=732184&view=rev
Log:
minor generics, import, and javadoc cleanup

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/DestinationFilter.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/DestinationFilter.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/DestinationFilter.java?rev=732184&r1=732183&r2=732184&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/DestinationFilter.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/DestinationFilter.java
Tue Jan  6 15:52:36 2009
@@ -17,9 +17,8 @@
 package org.apache.activemq.broker.region;
 
 import java.io.IOException;
-import java.util.Iterator;
-import java.util.Set;
 import java.util.List;
+import java.util.Set;
 
 import org.apache.activemq.broker.Broker;
 import org.apache.activemq.broker.ConnectionContext;
@@ -108,14 +107,17 @@
 
     /**
      * Sends a message to the given destination which may be a wildcard
+     * @param context broker context
+     * @param message message to send
+     * @param destination possibly wildcard destination to send the message to
+     * @throws Exception on error
      */
     protected void send(ProducerBrokerExchange context, Message message, ActiveMQDestination
destination)
         throws Exception {
         Broker broker = context.getConnectionContext().getBroker();
-        Set destinations = broker.getDestinations(destination);
+        Set<Destination> destinations = broker.getDestinations(destination);
 
-        for (Iterator iter = destinations.iterator(); iter.hasNext();) {
-            Destination dest = (Destination)iter.next();
+        for (Destination dest : destinations) {
             dest.send(context, message.copy());
         }
     }



Mime
View raw message