Return-Path: X-Original-To: apmail-activemq-commits-archive@www.apache.org Delivered-To: apmail-activemq-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BA72C1055B for ; Wed, 5 Jun 2013 14:38:27 +0000 (UTC) Received: (qmail 59568 invoked by uid 500); 5 Jun 2013 14:38:27 -0000 Delivered-To: apmail-activemq-commits-archive@activemq.apache.org Received: (qmail 59482 invoked by uid 500); 5 Jun 2013 14:38:26 -0000 Mailing-List: contact commits-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list commits@activemq.apache.org Received: (qmail 59474 invoked by uid 99); 5 Jun 2013 14:38:25 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Jun 2013 14:38:25 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Jun 2013 14:38:24 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id E4AF023889EB; Wed, 5 Jun 2013 14:38:04 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commits@activemq.apache.org From: tabish@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20130605143804.E4AF023889EB@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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); } }