mirror of https://github.com/apache/activemq.git
unroll the loop. git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1489888 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
767a59dfc4
commit
66a99fb580
|
@ -389,12 +389,11 @@ public class DestinationFilter implements Destination {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void deleteSubscription(ConnectionContext context, SubscriptionKey key) throws Exception {
|
public void deleteSubscription(ConnectionContext context, SubscriptionKey key) throws Exception {
|
||||||
Destination target = next;
|
if (next instanceof DestinationFilter) {
|
||||||
while (target instanceof DestinationFilter) {
|
DestinationFilter filter = (DestinationFilter) next;
|
||||||
target = ((DestinationFilter) target).next;
|
filter.deleteSubscription(context, key);
|
||||||
}
|
} else if (next instanceof Topic) {
|
||||||
if (target instanceof Topic) {
|
Topic topic = (Topic)next;
|
||||||
Topic topic = (Topic)target;
|
|
||||||
topic.deleteSubscription(context, key);
|
topic.deleteSubscription(context, key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue