summaryrefslogtreecommitdiff
path: root/java/client
diff options
context:
space:
mode:
authorRajith Muditha Attapattu <rajith@apache.org>2013-03-13 15:39:18 +0000
committerRajith Muditha Attapattu <rajith@apache.org>2013-03-13 15:39:18 +0000
commitedf8b6dd412748f3680cfdf3cc7a77ff4b7811cc (patch)
tree8d8d8ff2ec35176a8737fc694eda753869e62e02 /java/client
parentb3a55ac0653d71647ac56d76c2887a3d07f209c6 (diff)
downloadqpid-python-edf8b6dd412748f3680cfdf3cc7a77ff4b7811cc.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/qpid@1456007 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/client')
-rw-r--r--java/client/src/main/java/org/apache/qpid/client/AMQDestination.java32
1 files changed, 25 insertions, 7 deletions
diff --git a/java/client/src/main/java/org/apache/qpid/client/AMQDestination.java b/java/client/src/main/java/org/apache/qpid/client/AMQDestination.java
index f14b6d810b..58f7a465be 100644
--- a/java/client/src/main/java/org/apache/qpid/client/AMQDestination.java
+++ b/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;
}