From 0e7f383dfa335790e16d8181b26d1069df5426b2 Mon Sep 17 00:00:00 2001 From: Rajith Muditha Attapattu Date: Tue, 26 Mar 2013 21:29:45 +0000 Subject: QPID-3769 Added a check to see if the subject is equal. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1461324 13f79535-47bb-0310-9956-ffa450edef68 --- .../main/java/org/apache/qpid/client/AMQDestination.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'java/client') 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 6ca2988186..fc7762e77d 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 @@ -653,6 +653,17 @@ public abstract class AMQDestination implements Destination, Referenceable { return false; } + if (_subject == null) + { + if (that.getSubject() != null) + { + return false; + } + } + else if (!_subject.equals(that.getSubject())) + { + return false; + } } else { @@ -679,6 +690,10 @@ public abstract class AMQDestination implements Destination, Referenceable if (_destSyntax == DestSyntax.ADDR) { result = 29 * _addressType + _name.hashCode(); + if (_subject != null) + { + result = 29 * result + _subject.hashCode(); + } } else { -- cgit v1.2.1