From d60f7b836074c1254b99b057dd1483c1ec49ced9 Mon Sep 17 00:00:00 2001 From: Rajith Muditha Attapattu Date: Wed, 23 Mar 2011 02:31:14 +0000 Subject: 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 --- .../org/apache/qpid/client/messaging/address/AddressHelper.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'qpid/java/client/src') 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 { -- cgit v1.2.1