From d440e9884326185866044492f96c90cd993a1cfe Mon Sep 17 00:00:00 2001 From: Robert Godfrey Date: Mon, 24 Feb 2014 01:04:25 +0000 Subject: QPID-5582 : [Java Broker] only allow one binding per binding-key and queue at an exchange git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1571124 13f79535-47bb-0310-9956-ffa450edef68 --- .../qpid/server/protocol/v0_8/handler/QueueBindHandler.java | 2 +- .../qpid/server/protocol/v0_8/handler/QueueUnbindHandler.java | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'qpid/java/broker-plugins/amqp-0-8-protocol') diff --git a/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/handler/QueueBindHandler.java b/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/handler/QueueBindHandler.java index 78278b09c8..7ac71babf3 100644 --- a/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/handler/QueueBindHandler.java +++ b/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/handler/QueueBindHandler.java @@ -121,7 +121,7 @@ public class QueueBindHandler implements StateAwareMethodListener if(!exch.addBinding(bindingKey, queue, arguments) && TopicExchange.TYPE.equals(exch.getExchangeType())) { - Binding oldBinding = exch.getBinding(bindingKey, queue, arguments); + Binding oldBinding = exch.getBinding(bindingKey, queue); Map oldArgs = oldBinding.getArguments(); if((oldArgs == null && !arguments.isEmpty()) || (oldArgs != null && !oldArgs.equals(arguments))) diff --git a/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/handler/QueueUnbindHandler.java b/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/handler/QueueUnbindHandler.java index f44f831f68..f6dbd0cee0 100644 --- a/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/handler/QueueUnbindHandler.java +++ b/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/handler/QueueUnbindHandler.java @@ -25,12 +25,12 @@ import org.apache.log4j.Logger; import org.apache.qpid.AMQException; import org.apache.qpid.framing.AMQMethodBody; import org.apache.qpid.framing.AMQShortString; -import org.apache.qpid.framing.FieldTable; import org.apache.qpid.framing.MethodRegistry; import org.apache.qpid.framing.QueueUnbindBody; import org.apache.qpid.framing.amqp_0_9.MethodRegistry_0_9; import org.apache.qpid.framing.amqp_0_91.MethodRegistry_0_91; import org.apache.qpid.protocol.AMQConstant; +import org.apache.qpid.server.binding.Binding; import org.apache.qpid.server.protocol.v0_8.AMQChannel; import org.apache.qpid.server.exchange.Exchange; import org.apache.qpid.server.protocol.v0_8.AMQProtocolSession; @@ -100,7 +100,7 @@ public class QueueUnbindHandler implements StateAwareMethodListener