docs: final JsMessage setPropertiesInMessage(LMEMessage theMessage)
    {
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
        SibTr.entry(tc, "setPropertiesInMessage", theMessage);
  
      boolean copyMade = false;
  
      //  If this is pubsub we share this message with other subscribers so we have
      //  to make a copy prior to any updates. If this is pt-to-pt then any changes
      //  we make here can be done before the copy, the copy is still required to
      //  prevent a consumer from rolling back after modifying the message but
      //  anything we set here will be reset the next time round so there's no harm
      //  done. It is best to defer the 'copy' until after we've changed it so there
      //  is less likelyhood of a real copy being required.
      JsMessageWrapper jsMessageWrapper = (JsMessageWrapper) theMessage.message;
      JsMessage jsMsg = jsMessageWrapper.getMessage();
  
      try
      {
        //set the redeliveredCount if required
        if (jsMessageWrapper.guessRedeliveredCount() != 0)
        {
          if(isPubsub)
          {
            jsMsg = jsMsg.getReceived();
            copyMade = true;
          }
  
          jsMsg.setRedeliveredCount(jsMessageWrapper.guessRedeliveredCount());
        }
  
        long waitTime = jsMessageWrapper.updateStatisticsMessageWaitTime();
  
        //Only store wait time in message where explicitly
        // asked
        if (setWaitTime )
        {
          //defect 256701: we only set the message wait time if it is
          //a significant value.
          boolean waitTimeIsSignificant =
            waitTime > messageProcessor.getCustomProperties().get_message_wait_time_granularity();
  
          if(waitTimeIsSignificant)
          {
            if(isPubsub && !copyMade)
            {
              jsMsg = jsMsg.getReceived();
              copyMade = true;
            }
  
            jsMsg.setMessageWaitTime(waitTime);
          }
        }
  
        // If we deferred the copy till now we need to see if one is
        // needed. This will be the case either if the consumer has indicated that
        // it may change the message (not a comms client) and the message is still
        // on an itemStream (i.e. they could rollback the message with their changes).
        // Otherwise we can just give them our copy as we'll never want it back or
        // give it to anyone else.
        if(!copyMade && ((theMessage.isStored && copyMsg) || isPubsub))
          jsMsg = jsMsg.getReceived();
      }
      catch (MessageCopyFailedException e)
      {
        FFDCFilter.processException(
          e,
          "com.ibm.ws.sib.processor.impl.AbstractLockedMessageEnumeration.setPropertiesInMessage",
          "1:2086:1.154.3.1",
          this);
  
        SibTr.exception(tc, e);
        SibTr.error(tc, "INTERNAL_MESSAGING_ERROR_CWSIP0002",
          new Object[] {
            "com.ibm.ws.sib.processor.impl.AbstractLockedMessageEnumeration",
            "1:2093:1.154.3.1",
            e });
  
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
          SibTr.exit(tc, "setPropertiesInMessage", e);
  
        throw new SIErrorException(
          nls.getFormattedMessage(
            "INTERNAL_MESSAGING_ERROR_CWSIP0002",
            new Object[] {
              "com.ibm.ws.sib.processor.impl.AbstractLockedMessageEnumeration",
              "1:2104:1.154.3.1",
              e },
            null),
          e);
      }
  
  
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
        SibTr.exit(tc, "setPropertiesInMessage", jsMsg);
      return jsMsg;
    }