summaryrefslogtreecommitdiff
path: root/qpid/java
diff options
context:
space:
mode:
Diffstat (limited to 'qpid/java')
-rw-r--r--qpid/java/client/src/main/java/org/apache/qpid/client/AMQDestination.java32
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;
}