diff options
author | Aidan Skinner <aidan@apache.org> | 2008-08-20 16:26:16 +0000 |
---|---|---|
committer | Aidan Skinner <aidan@apache.org> | 2008-08-20 16:26:16 +0000 |
commit | 2c7aeaccc3fa471f54aad62f0fc4dd455ca0179f (patch) | |
tree | b5ac73a977f532298fd3e6d39396ced873f90d59 | |
parent | 8bed0ed09e5a97de49d0fbebf0b91d9fc0e74733 (diff) | |
download | qpid-python-2c7aeaccc3fa471f54aad62f0fc4dd455ca0179f.tar.gz |
QPID-1202: TopicExchance.removeFilteredQueue: if there are no instances of the filter, it's ok to remove it.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@687382 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/TopicExchange.java | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/TopicExchange.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/TopicExchange.java index 59a8339346..bc303a219d 100644 --- a/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/TopicExchange.java +++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/TopicExchange.java @@ -216,17 +216,20 @@ public class TopicExchange extends AbstractExchange 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); } } |