summaryrefslogtreecommitdiff
path: root/qpid/java/client/src
diff options
context:
space:
mode:
authorRajith Muditha Attapattu <rajith@apache.org>2011-03-23 02:31:14 +0000
committerRajith Muditha Attapattu <rajith@apache.org>2011-03-23 02:31:14 +0000
commitd60f7b836074c1254b99b057dd1483c1ec49ced9 (patch)
tree405a8a292bc90e355906f26e4a49a6476c806a5a /qpid/java/client/src
parent17baa5e47a3053b660efdc1dbe65d3ae710096c7 (diff)
downloadqpid-python-d60f7b836074c1254b99b057dd1483c1ec49ced9.tar.gz
QPID-3156
The address parser treats 'true' as a string while it treats 'True' as a boolean. Therefore I modified the AddressHelper class to expect both forms. The MapAccessor class used for the rest of code already handles this case. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1084462 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/client/src')
-rw-r--r--qpid/java/client/src/main/java/org/apache/qpid/client/messaging/address/AddressHelper.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/qpid/java/client/src/main/java/org/apache/qpid/client/messaging/address/AddressHelper.java b/qpid/java/client/src/main/java/org/apache/qpid/client/messaging/address/AddressHelper.java
index e454a8eee4..dd033c536d 100644
--- a/qpid/java/client/src/main/java/org/apache/qpid/client/messaging/address/AddressHelper.java
+++ b/qpid/java/client/src/main/java/org/apache/qpid/client/messaging/address/AddressHelper.java
@@ -234,7 +234,14 @@ public class AddressHelper
{
if (map != null && map.get(DURABLE) != null)
{
- return Boolean.parseBoolean((String)map.get(DURABLE));
+ if (map.get(DURABLE) instanceof Boolean)
+ {
+ return (Boolean)map.get(DURABLE);
+ }
+ else
+ {
+ return Boolean.parseBoolean((String)map.get(DURABLE));
+ }
}
else
{