diff options
author | Rajith Muditha Attapattu <rajith@apache.org> | 2011-03-23 02:31:14 +0000 |
---|---|---|
committer | Rajith Muditha Attapattu <rajith@apache.org> | 2011-03-23 02:31:14 +0000 |
commit | 55c35365f754bbfce040b4e82f618a31fcac36f3 (patch) | |
tree | 34cf204ac3e8863797b6f8d5d65e37bbb0b4813e /java/client/src | |
parent | f3b544b7f5c7575feed12171dd1040b69a578186 (diff) | |
download | qpid-python-55c35365f754bbfce040b4e82f618a31fcac36f3.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/qpid@1084462 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/client/src')
-rw-r--r-- | java/client/src/main/java/org/apache/qpid/client/messaging/address/AddressHelper.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/java/client/src/main/java/org/apache/qpid/client/messaging/address/AddressHelper.java b/java/client/src/main/java/org/apache/qpid/client/messaging/address/AddressHelper.java index e454a8eee4..dd033c536d 100644 --- a/java/client/src/main/java/org/apache/qpid/client/messaging/address/AddressHelper.java +++ b/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 { |