Github user michaelandrepearce commented on a diff in the pull request:

    https://github.com/apache/activemq-artemis/pull/1846#discussion_r165900914
  
    --- Diff: 
artemis-core-client/src/main/java/org/apache/activemq/artemis/core/message/impl/CoreMessage.java
 ---
    @@ -437,7 +437,11 @@ public CoreMessage setMessageID(long messageID) {
     
        @Override
        public CoreMessage setAddress(SimpleString address) {
    -      if (validBuffer && !address.equals(this.address)) {
    +      if (address == null && this.address == null) {
    +         // no-op so just return
    +         return this;
    +      }
    +      if (validBuffer && ((address == null && this.address != null) || 
!address.equals(this.address))) {
    --- End diff --
    
    When you're here, if address is null, you already know this.address is not 
null, due to the preceding check.


---

Reply via email to