activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r1489888 - /activemq/trunk/activemq-broker/src/main/java/org/apache/activemq/broker/region/DestinationFilter.java
Date Wed, 05 Jun 2013 14:38:04 GMT
Author: tabish
Date: Wed Jun  5 14:38:04 2013
New Revision: 1489888

URL: http://svn.apache.org/r1489888
Log:
https://issues.apache.org/jira/browse/AMQ-4571

unroll the loop. 

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

Modified: activemq/trunk/activemq-broker/src/main/java/org/apache/activemq/broker/region/DestinationFilter.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-broker/src/main/java/org/apache/activemq/broker/region/DestinationFilter.java?rev=1489888&r1=1489887&r2=1489888&view=diff
==============================================================================
--- activemq/trunk/activemq-broker/src/main/java/org/apache/activemq/broker/region/DestinationFilter.java
(original)
+++ activemq/trunk/activemq-broker/src/main/java/org/apache/activemq/broker/region/DestinationFilter.java
Wed Jun  5 14:38:04 2013
@@ -389,12 +389,11 @@ public class DestinationFilter implement
     }
 
     public void deleteSubscription(ConnectionContext context, SubscriptionKey key) throws
Exception {
-        Destination target = next;
-        while (target instanceof DestinationFilter) {
-            target = ((DestinationFilter) target).next;
-        }
-        if (target instanceof Topic) {
-            Topic topic = (Topic)target;
+        if (next instanceof DestinationFilter) {
+            DestinationFilter filter = (DestinationFilter) next;
+            filter.deleteSubscription(context, key);
+        } else if (next instanceof Topic) {
+            Topic topic = (Topic)next;
             topic.deleteSubscription(context, key);
         }
     }



Mime
View raw message