Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
Java-SCA-2.x
-
None
Description
In the JMSBindingProcessor.writeOperationProperties() method there are two corrections which need to be made.
1) Update logic for writing properties. Currently the logic is
if (operationProperties != null){
if ((jmsType != null && jmsType.length() > 0) ||
(jmsCorrelationId != null && jmsCorrelationId.length() > 0) ||
jmsDeliveryMode != null || jmsTimeToLive != null ||
jmsPriority != null) {
}
So this will only write jmsType, jmsDeliveryMode and jmsPriority only if there actually are operation properties. However, this may not always be the case. So the logic should be updated to 1 if statement connected with "or" clauses.
2) Also trim() should be added to 0 length checks, and add possibly added before actually writing the value.
So the update code would be:
if ( (operationProperties != null && !operationProperties.isEmpty()) || (jmsType != null && jmsType.trim().length() > 0) ||
jmsDeliveryMode != null || jmsTimeToLive != null ||
jmsPriority != null) {
.....
if (jmsType != null && jmsType.trim().length() > 0)
{ writer.writeAttribute("type", jmsType.trim()); }........
}