ARTEMIS-1951 allow queue's user to be updated

Fix so that it only updates if not null, to avoid user being unset from 
existing api's, 
This is similar to other values, that only change the value when not null.

(cherry picked from commit c7c23454e810c6d32593dd4f18feb05eebfdaad3)


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/20b746ec
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/20b746ec
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/20b746ec

Branch: refs/heads/2.6.x
Commit: 20b746ec28b3c54f98ac302566629a0364446851
Parents: dcd88b2
Author: Michael André Pearce <[email protected]>
Authored: Mon Jun 25 13:55:16 2018 +0100
Committer: Justin Bertram <[email protected]>
Committed: Mon Oct 1 13:03:52 2018 -0500

----------------------------------------------------------------------
 .../activemq/artemis/core/postoffice/impl/PostOfficeImpl.java      | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/20b746ec/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/PostOfficeImpl.java
----------------------------------------------------------------------
diff --git 
a/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/PostOfficeImpl.java
 
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/PostOfficeImpl.java
index 6a3dd28..ee017dd 100644
--- 
a/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/PostOfficeImpl.java
+++ 
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/PostOfficeImpl.java
@@ -512,7 +512,7 @@ public class PostOfficeImpl implements PostOffice, 
NotificationListener, Binding
             changed = true;
             queue.setExclusive(exclusive);
          }
-         if ((user != null && !user.equals(queue.getUser()) || (user == null 
&& queue.getUser() != null))) {
+         if (user != null && !user.equals(queue.getUser())) {
             changed = true;
             queue.setUser(user);
          }

Reply via email to