qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ai...@apache.org
Subject svn commit: r687382 - /incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/TopicExchange.java
Date Wed, 20 Aug 2008 16:26:18 GMT
Author: aidan
Date: Wed Aug 20 09:26:16 2008
New Revision: 687382

URL: http://svn.apache.org/viewvc?rev=687382&view=rev
Log:
QPID-1202: TopicExchance.removeFilteredQueue: if there are no instances of the filter, it's
ok to remove it.

Modified:
    incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/TopicExchange.java

Modified: incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/TopicExchange.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/TopicExchange.java?rev=687382&r1=687381&r2=687382&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/TopicExchange.java
(original)
+++ incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/TopicExchange.java
Wed Aug 20 09:26:16 2008
@@ -216,17 +216,20 @@
             if(filters != null)
             {
                 Integer instances = filters.get(filter);
-                if(instances == 1)
+                if(instances != null)
                 {
-                    filters.remove(filter);
-                    if(filters.isEmpty())
+                    if(instances == 1)
                     {
-                        _filteredQueues.remove(queue);
+                        filters.remove(filter);
+                        if(filters.isEmpty())
+                        {
+                            _filteredQueues.remove(queue);
+                        }
+                    }
+                    else 
+                    {
+                        filters.put(filter, instances - 1);
                     }
-                }
-                else if(instances != null)
-                {
-                    filters.put(filter, instances - 1);
                 }
 
             }



Mime
View raw message