diff options
author | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2011-11-03 14:33:52 +0000 |
---|---|---|
committer | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2011-11-03 14:33:52 +0000 |
commit | cfa9ec20e1b3f0d0c3f328e7ec59c674fdffe8a1 (patch) | |
tree | 39db9ecacd0b96afb84fb7254b22323698ad4f6c | |
parent | 5d63998add4e6e3a665df7cc53680ce1774d577e (diff) |
TUSCANY-3971: JMSBindingProcessor.writeOperationProperties should trim() properties prior to writing them & update logic to write JMS attributes even if properties are null.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1197149 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | sca-java-2.x/trunk/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/JMSBindingProcessor.java | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/sca-java-2.x/trunk/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/JMSBindingProcessor.java b/sca-java-2.x/trunk/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/JMSBindingProcessor.java index b9d7d7a6f6..a428af8812 100644 --- a/sca-java-2.x/trunk/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/JMSBindingProcessor.java +++ b/sca-java-2.x/trunk/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/JMSBindingProcessor.java @@ -1304,16 +1304,14 @@ public class JMSBindingProcessor extends BaseStAXArtifactProcessor implements St Integer jmsPriority = jmsBinding.getOperationJMSPriority(opName); Map<String, Object> operationProperties = jmsBinding.getOperationProperties(opName); - if (operationProperties != null){ - if ((jmsType != null && jmsType.length() > 0) || - (jmsCorrelationId != null && jmsCorrelationId.length() > 0) || - jmsDeliveryMode != null || jmsTimeToLive != null || - jmsPriority != null) { - + if ( (operationProperties != null && !operationProperties.isEmpty()) || (jmsType != null && jmsType.trim().length() > 0) || + jmsDeliveryMode != null || jmsTimeToLive != null || + jmsPriority != null) { + writer.writeStartElement(Constants.SCA11_NS, JMSBindingConstants.HEADERS); - if (jmsType != null && jmsType.length() > 0) { - writer.writeAttribute("type", jmsType); + if (jmsType != null && jmsType.trim().length() > 0) { + writer.writeAttribute("type", jmsType.trim()); } if (jmsDeliveryMode != null) { @@ -1336,7 +1334,6 @@ public class JMSBindingProcessor extends BaseStAXArtifactProcessor implements St writer.writeEndElement(); // Strange bug. Without white space, headers end tag improperly read. // writer.writeCharacters( " " ); - } } writer.writeEndElement(); |