summaryrefslogtreecommitdiff
path: root/qpid/java
diff options
context:
space:
mode:
Diffstat (limited to 'qpid/java')
-rw-r--r--qpid/java/client/src/main/java/org/apache/qpid/client/messaging/address/AddressHelper.java18
1 files changed, 13 insertions, 5 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 0aa2257126..64d5b16db0 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
@@ -217,11 +217,7 @@ public class AddressHelper
private void fillInCommonNodeArgs(Node node, Map parent, MapAccessor argsMap)
{
- if (nodeProps != null)
- {
- node.setDurable(nodeProps.getBoolean(DURABLE) == null ? false
- : nodeProps.getBoolean(DURABLE));
- }
+ node.setDurable(getDurability(parent));
node.setAutoDelete(argsMap.getBoolean(AUTO_DELETE) == null ? false
: argsMap.getBoolean(AUTO_DELETE));
node.setAlternateExchange(argsMap.getString(ALT_EXCHANGE));
@@ -231,6 +227,18 @@ public class AddressHelper
node.setDeclareArgs((Map<String,Object>)getDeclareArgs(parent).get(ARGUMENTS));
}
}
+
+ private boolean getDurability(Map map)
+ {
+ if (map != null && map.get(DURABLE) != null)
+ {
+ return Boolean.parseBoolean((String)map.get(DURABLE));
+ }
+ else
+ {
+ return false;
+ }
+ }
/**
* if the type == queue x-declare args from the node props is used. if the