Tuscany
  1. Tuscany
  2. TUSCANY-3971

JMSBindingProcessor.writeOperationProperties should trim() properties prior to writing them & update logic to write JMS attributes even if properties are null.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: Java-SCA-2.x
    • Fix Version/s: Java-SCA-2.x
    • Component/s: SCA Java Runtime
    • Labels:
      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()); }

      ........
      }

        Activity

        Hide
        ant elder added a comment -

        Fixed by updating as suggested

        Show
        ant elder added a comment - Fixed by updating as suggested

          People

          • Assignee:
            Unassigned
            Reporter:
            Jennifer A Thompson
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development