From c7c23454e810c6d32593dd4f18feb05eebfdaad3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Andr=C3=A9=20Pearce?= Date: Mon, 25 Jun 2018 13:55:16 +0100 Subject: [PATCH] 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. --- .../activemq/artemis/core/postoffice/impl/PostOfficeImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 fb973ecfc6..2b5ba602fd 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); }