Uploaded image for project: '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.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Java-SCA-2.x
    • Java-SCA-2.x
    • SCA Java Runtime
    • 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()); }

      ........
      }

      Attachments

        Activity

          People

            Unassigned Unassigned
            jennthom Jennifer Thompson
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: