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 91A5D1098B for ; Tue, 4 Jun 2013 15:45:15 +0000 (UTC) Received: (qmail 1015 invoked by uid 500); 4 Jun 2013 15:45:15 -0000 Delivered-To: apmail-activemq-commits-archive@activemq.apache.org Received: (qmail 939 invoked by uid 500); 4 Jun 2013 15:45:14 -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 932 invoked by uid 99); 4 Jun 2013 15:45:14 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Jun 2013 15:45:14 +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; Tue, 04 Jun 2013 15:45:12 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id BB4AB23889F1; Tue, 4 Jun 2013 15:44:51 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1489485 - /activemq/trunk/activemq-broker/src/main/java/org/apache/activemq/broker/region/DestinationFilter.java Date: Tue, 04 Jun 2013 15:44:51 -0000 To: commits@activemq.apache.org From: tabish@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20130604154451.BB4AB23889F1@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: tabish Date: Tue Jun 4 15:44:50 2013 New Revision: 1489485 URL: http://svn.apache.org/r1489485 Log: Fix for: https://issues.apache.org/jira/browse/AMQ-4571 accounts for nested Destination filters. 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=1489485&r1=1489484&r2=1489485&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 Tue Jun 4 15:44:50 2013 @@ -389,8 +389,13 @@ public class DestinationFilter implement } public void deleteSubscription(ConnectionContext context, SubscriptionKey key) throws Exception { - if (next instanceof Topic) { - ((Topic) next).deleteSubscription(context, key); + Destination target = next; + while (target instanceof DestinationFilter) { + target = ((DestinationFilter) target).next; + } + if (target instanceof Topic) { + Topic topic = (Topic)target; + topic.deleteSubscription(context, key); } } }