summaryrefslogtreecommitdiff
path: root/qpid/java/client
diff options
context:
space:
mode:
authorRajith Muditha Attapattu <rajith@apache.org>2008-02-27 20:01:12 +0000
committerRajith Muditha Attapattu <rajith@apache.org>2008-02-27 20:01:12 +0000
commit1da529bbb6b0a5e21677413b0667fa6f3125f127 (patch)
tree39345fb065bed051589d6c60eaf96185eedcf25d /qpid/java/client
parent6f16a709897bedba2e2361149dbc56f675a9924d (diff)
downloadqpid-python-1da529bbb6b0a5e21677413b0667fa6f3125f127.tar.gz
Fixed the toString method to avoid printing both a routingkey and bindingkey and also to properly printout the bindingkeys when required.
This bug caused 3 test failures. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@631698 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/client')
-rw-r--r--qpid/java/client/src/main/java/org/apache/qpid/client/AMQDestination.java16
1 files changed, 8 insertions, 8 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 0cf1cb32a1..e02b3d6643 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
@@ -274,19 +274,19 @@ public abstract class AMQDestination implements Destination, Referenceable
sb.append(URLHelper.DEFAULT_OPTION_SEPERATOR);
}
- if (_bindingKeys != null && _bindingKeys.length>0)
+ // We can't allow both routingKey and bindingKey
+ if (_routingKey == null && _bindingKeys != null && _bindingKeys.length>0)
{
- sb.append(BindingURL.OPTION_BINDING_KEY);
- sb.append("='");
+
for (AMQShortString bindingKey:_bindingKeys)
{
-
- sb.append(bindingKey).append(",");
+ sb.append(BindingURL.OPTION_BINDING_KEY);
+ sb.append("='");
+ sb.append(bindingKey);
+ sb.append("'");
+ sb.append(URLHelper.DEFAULT_OPTION_SEPERATOR);
}
- sb.deleteCharAt(sb.length() - 1);
- sb.append("'");
- sb.append(URLHelper.DEFAULT_OPTION_SEPERATOR);
}
if (_isDurable)