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:
Timothy A. Bish 2013-06-05 14:38:04 +00:00
parent 767a59dfc4
commit 66a99fb580
1 changed files with 5 additions and 6 deletions

View File

@ -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);
}
}