qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From raj...@apache.org
Subject svn commit: r1456007 - /qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQDestination.java
Date Wed, 13 Mar 2013 15:39:18 GMT
Author: rajith
Date: Wed Mar 13 15:39:18 2013
New Revision: 1456007

URL: http://svn.apache.org/r1456007
Log:
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.

Modified:
    qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQDestination.java

Modified: qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQDestination.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQDestination.java?rev=1456007&r1=1456006&r2=1456007&view=diff
==============================================================================
--- qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQDestination.java (original)
+++ qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQDestination.java Wed
Mar 13 15:39:18 2013
@@ -638,20 +638,38 @@ public abstract class AMQDestination imp
 
         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;
     }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message