activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbert...@apache.org
Subject [2/4] activemq-artemis git commit: ARTEMIS-1951 fix comparison bug
Date Mon, 01 Oct 2018 18:05:15 GMT
ARTEMIS-1951 fix comparison bug

(cherry picked from commit f9af366f07368bfaed197cb1eddfde17506c9d84)


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

Branch: refs/heads/2.6.x
Commit: dcd88b2c8b15f53bcd634ab62785cfd6b9668ebe
Parents: 0f7d3d5
Author: Justin Bertram <jbertram@apache.org>
Authored: Sat Jun 23 11:42:41 2018 -0500
Committer: Justin Bertram <jbertram@apache.org>
Committed: Mon Oct 1 13:03:35 2018 -0500

----------------------------------------------------------------------
 .../org/apache/activemq/artemis/core/postoffice/PostOffice.java  | 2 +-
 .../activemq/artemis/core/postoffice/impl/PostOfficeImpl.java    | 4 ++--
 .../activemq/artemis/core/server/impl/ActiveMQServerImpl.java    | 2 +-
 .../tests/unit/core/server/impl/fakes/FakePostOffice.java        | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/dcd88b2c/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/PostOffice.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/PostOffice.java
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/PostOffice.java
index 024a806..d95526d 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/PostOffice.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/PostOffice.java
@@ -69,7 +69,7 @@ public interface PostOffice extends ActiveMQComponent {
                             Integer maxConsumers,
                             Boolean purgeOnNoConsumers,
                             Boolean exclusive,
-                            String user) throws Exception;
+                            SimpleString user) throws Exception;
 
    List<Queue> listQueuesForAddress(SimpleString address) throws Exception;
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/dcd88b2c/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 4c78a79..6a3dd28 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
@@ -468,7 +468,7 @@ public class PostOfficeImpl implements PostOffice, NotificationListener,
Binding
                                    Integer maxConsumers,
                                    Boolean purgeOnNoConsumers,
                                    Boolean exclusive,
-                                   String user) throws Exception {
+                                   SimpleString user) throws Exception {
       synchronized (addressLock) {
          final QueueBinding queueBinding = (QueueBinding) addressManager.getBinding(name);
          if (queueBinding == null) {
@@ -514,7 +514,7 @@ public class PostOfficeImpl implements PostOffice, NotificationListener,
Binding
          }
          if ((user != null && !user.equals(queue.getUser()) || (user == null &&
queue.getUser() != null))) {
             changed = true;
-            queue.setUser(SimpleString.toSimpleString(user));
+            queue.setUser(user);
          }
 
          if (changed) {

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/dcd88b2c/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java
index 1e5343c..5aca765 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java
@@ -2997,7 +2997,7 @@ public class ActiveMQServerImpl implements ActiveMQServer {
                             Boolean purgeOnNoConsumers,
                             Boolean exclusive,
                             String user) throws Exception {
-      final QueueBinding queueBinding = this.postOffice.updateQueue(new SimpleString(name),
routingType, maxConsumers, purgeOnNoConsumers, exclusive, user);
+      final QueueBinding queueBinding = this.postOffice.updateQueue(new SimpleString(name),
routingType, maxConsumers, purgeOnNoConsumers, exclusive, new SimpleString(user));
       if (queueBinding != null) {
          final Queue queue = queueBinding.getQueue();
          return queue;

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/dcd88b2c/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/server/impl/fakes/FakePostOffice.java
----------------------------------------------------------------------
diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/server/impl/fakes/FakePostOffice.java
b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/server/impl/fakes/FakePostOffice.java
index b0560e3..3f35084 100644
--- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/server/impl/fakes/FakePostOffice.java
+++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/server/impl/fakes/FakePostOffice.java
@@ -49,7 +49,7 @@ public class FakePostOffice implements PostOffice {
                                    Integer maxConsumers,
                                    Boolean purgeOnNoConsumers,
                                    Boolean exclusive,
-                                   String user) throws Exception {
+                                   SimpleString user) throws Exception {
       return null;
    }
 


Mime
View raw message