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/11/23 17:43:30 UTC

[29/48] activemq-artemis git commit: Don't throw so many exceptions

Don't throw so many exceptions


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

Branch: refs/heads/ARTEMIS-780
Commit: 2b2b7c33ff27f52c89803ce52f5b2193bb7824fb
Parents: dd1a9cc
Author: jbertram <jb...@apache.com>
Authored: Wed Nov 16 16:24:10 2016 -0600
Committer: jbertram <jb...@apache.com>
Committed: Wed Nov 23 09:04:35 2016 -0600

----------------------------------------------------------------------
 .../artemis/core/management/impl/ActiveMQServerControlImpl.java   | 3 ++-
 .../activemq/artemis/core/postoffice/impl/PostOfficeImpl.java     | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/2b2b7c33/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/ActiveMQServerControlImpl.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/ActiveMQServerControlImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/ActiveMQServerControlImpl.java
index b70abdc..25b9fdb 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/ActiveMQServerControlImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/ActiveMQServerControlImpl.java
@@ -789,7 +789,8 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active
    public String getAddressInfo(String address) throws ActiveMQAddressDoesNotExistException {
       AddressInfo addressInfo = server.getAddressInfo(SimpleString.toSimpleString(address));
       if (addressInfo == null) {
-         throw ActiveMQMessageBundle.BUNDLE.addressDoesNotExist(SimpleString.toSimpleString(address));
+//         throw ActiveMQMessageBundle.BUNDLE.addressDoesNotExist(SimpleString.toSimpleString(address));
+         return null;
       } else {
          return addressInfo.toString();
       }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/2b2b7c33/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 fbb6385..1c0c343 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
@@ -450,7 +450,8 @@ public class PostOfficeImpl implements PostOffice, NotificationListener, Binding
       synchronized (addressLock) {
          Bindings bindingsForAddress = getBindingsForAddress(address);
          if (bindingsForAddress.getBindings().size() > 0) {
-            throw new IllegalStateException("Address has bindings");
+            return null;
+//            throw new IllegalStateException("Address has bindings");
          }
          managementService.unregisterAddress(address);
          return addressManager.removeAddressInfo(address);