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 {
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue