diff options
author | Rajith Muditha Attapattu <rajith@apache.org> | 2013-03-13 15:39:18 +0000 |
---|---|---|
committer | Rajith Muditha Attapattu <rajith@apache.org> | 2013-03-13 15:39:18 +0000 |
commit | 24a380383777903d18ae5d6d535bc0dda23f05f6 (patch) | |
tree | 050a97692f3e726a39cb76b67d286501ccb3ae04 | |
parent | 50b01b5ffd0f7f072543c624d28533263b4ee851 (diff) | |
download | qpid-python-24a380383777903d18ae5d6d535bc0dda23f05f6.tar.gz |
QPID-3769 Applying a modified version of a patch from Siddesh Poyarekar.
The original patch did a literal comparison of the address strings which
can cause issues if it had white spaces. The modified version matches
the type and name.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1456007 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | qpid/java/client/src/main/java/org/apache/qpid/client/AMQDestination.java | 32 |
1 files changed, 25 insertions, 7 deletions
diff --git a/qpid/java/client/src/main/java/org/apache/qpid/client/AMQDestination.java b/qpid/java/client/src/main/java/org/apache/qpid/client/AMQDestination.java index f14b6d810b..58f7a465be 100644 --- a/qpid/java/client/src/main/java/org/apache/qpid/client/AMQDestination.java +++ b/qpid/java/client/src/main/java/org/apache/qpid/client/AMQDestination.java @@ -638,20 +638,38 @@ public abstract class AMQDestination implements Destination, Referenceable final AMQDestination that = (AMQDestination) o; - if (!_exchangeClass.equals(that._exchangeClass)) + if (_destSyntax != that.getDestSyntax()) { return false; } - if (!_exchangeName.equals(that._exchangeName)) + + if (_destSyntax == DestSyntax.ADDR) { - return false; + if (_addressType != that.getAddressType()) + { + return false; + } + if (!_name.equals(that.getAddressName())) + { + return false; + } } - if ((_queueName == null && that._queueName != null) || - (_queueName != null && !_queueName.equals(that._queueName))) + else { - return false; + if (!_exchangeClass.equals(that._exchangeClass)) + { + return false; + } + if (!_exchangeName.equals(that._exchangeName)) + { + return false; + } + if ((_queueName == null && that._queueName != null) || + (_queueName != null && !_queueName.equals(that._queueName))) + { + return false; + } } - return true; } |