activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbert...@apache.org
Subject [1/3] activemq-artemis git commit: Fix AddressCommandTest
Date Fri, 09 Dec 2016 03:15:36 GMT
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 <jbertram@apache.com>
Authored: Thu Dec 8 21:01:06 2016 -0600
Committer: jbertram <jbertram@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) -> {


Mime
View raw message