You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by jb...@apache.org on 2016/12/09 03:15:36 UTC

[1/3] activemq-artemis git commit: Fix AddressCommandTest

Repository: activemq-artemis
Updated Branches:
  refs/heads/ARTEMIS-780 fd5352543 -> c84285f26


Fix AddressCommandTest


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

Branch: refs/heads/ARTEMIS-780
Commit: a8b42b0530ca6932a5194160d3e6f86fbc8f3471
Parents: fd53525
Author: jbertram <jb...@apache.com>
Authored: Thu Dec 8 21:01:06 2016 -0600
Committer: jbertram <jb...@apache.com>
Committed: Thu Dec 8 21:01:06 2016 -0600

----------------------------------------------------------------------
 .../artemis/core/postoffice/impl/PostOfficeImpl.java         | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/a8b42b05/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 69256f2..a1e6a21 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
@@ -473,9 +473,11 @@ public class PostOfficeImpl implements PostOffice, NotificationListener, Binding
       synchronized (addressLock) {
          if (RoutingType.MULTICAST.equals(routingType)) {
             final Bindings bindings = addressManager.getBindingsForRoutingAddress(addressName);
-            final boolean existsQueueBindings = bindings.getBindings().stream().anyMatch(QueueBinding.class::isInstance);
-            if (existsQueueBindings) {
-               throw ActiveMQMessageBundle.BUNDLE.invalidMulticastRoutingTypeDelete();
+            if (bindings != null) {
+               final boolean existsQueueBindings = bindings.getBindings().stream().anyMatch(QueueBinding.class::isInstance);
+               if (existsQueueBindings) {
+                  throw ActiveMQMessageBundle.BUNDLE.invalidMulticastRoutingTypeDelete();
+               }
             }
          }
          final AddressInfo updateAddressInfo = addressManager.updateAddressInfoIfPresent(addressName, (name, addressInfo) -> {


[2/3] activemq-artemis git commit: Fix QueueCommandTest

Posted by jb...@apache.org.
Fix QueueCommandTest


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

Branch: refs/heads/ARTEMIS-780
Commit: 3f2a0afeef42bd92bfc67441d2d421dcd5d302fd
Parents: a8b42b0
Author: jbertram <jb...@apache.com>
Authored: Thu Dec 8 21:08:01 2016 -0600
Committer: jbertram <jb...@apache.com>
Committed: Thu Dec 8 21:08:01 2016 -0600

----------------------------------------------------------------------
 .../activemq/artemis/core/server/impl/ActiveMQServerImpl.java      | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/3f2a0afe/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 e962aa0..ed8c3d8 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
@@ -2519,6 +2519,8 @@ public class ActiveMQServerImpl implements ActiveMQServer {
             createOrUpdateAddressInfo(defaultAddressInfo.setAutoCreated(true));
             addressAlreadyExists = false;
          }
+      } else if (info == null) {
+         throw ActiveMQMessageBundle.BUNDLE.addressDoesNotExist(addressName);
       }
 
       final QueueConfig queueConfig = queueConfigBuilder.filter(filter).pagingManager(pagingManager).user(user).durable(durable).temporary(temporary).autoCreated(autoCreated).routingType(routingType).maxConsumers(maxConsumers).deleteOnNoConsumers(deleteOnNoConsumers).build();


[3/3] activemq-artemis git commit: Fix ManagementServiceImplTest

Posted by jb...@apache.org.
Fix ManagementServiceImplTest


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

Branch: refs/heads/ARTEMIS-780
Commit: c84285f262fe2e7fbf51a96cae744ab662dc411e
Parents: 3f2a0af
Author: jbertram <jb...@apache.com>
Authored: Thu Dec 8 21:11:19 2016 -0600
Committer: jbertram <jb...@apache.com>
Committed: Thu Dec 8 21:11:19 2016 -0600

----------------------------------------------------------------------
 .../core/server/management/impl/ManagementServiceImpl.java        | 2 +-
 .../artemis/tests/unit/core/postoffice/impl/FakeQueue.java        | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/c84285f2/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/management/impl/ManagementServiceImpl.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/management/impl/ManagementServiceImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/management/impl/ManagementServiceImpl.java
index 71d988d..73dfda5 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/management/impl/ManagementServiceImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/management/impl/ManagementServiceImpl.java
@@ -242,7 +242,7 @@ public class ManagementServiceImpl implements ManagementService {
          queueControl.setMessageCounter(counter);
          messageCounterManager.registerMessageCounter(queue.getName().toString(), counter);
       }
-      ObjectName objectName = objectNameBuilder.getQueueObjectName(address, queue.getName(),queue.getRoutingType());
+      ObjectName objectName = objectNameBuilder.getQueueObjectName(address, queue.getName(), queue.getRoutingType());
       registerInJMX(objectName, queueControl);
       registerInRegistry(ResourceNames.QUEUE + queue.getName(), queueControl);
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/c84285f2/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/postoffice/impl/FakeQueue.java
----------------------------------------------------------------------
diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/postoffice/impl/FakeQueue.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/postoffice/impl/FakeQueue.java
index ed15c71..0a72178 100644
--- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/postoffice/impl/FakeQueue.java
+++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/postoffice/impl/FakeQueue.java
@@ -21,6 +21,7 @@ import java.util.Map;
 import java.util.Set;
 import java.util.concurrent.Executor;
 
+import org.apache.activemq.artemis.api.config.ActiveMQDefaultConfiguration;
 import org.apache.activemq.artemis.api.core.SimpleString;
 import org.apache.activemq.artemis.core.filter.Filter;
 import org.apache.activemq.artemis.core.paging.cursor.PageSubscription;
@@ -562,7 +563,7 @@ public class FakeQueue implements Queue {
 
    @Override
    public RoutingType getRoutingType() {
-      return null;
+      return ActiveMQDefaultConfiguration.getDefaultRoutingType();
    }
 
    @Override