ARTEMIS-802 Broker does not throw exception on divert with no name
Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/b08b91a3 Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/b08b91a3 Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/b08b91a3 Branch: refs/heads/ARTEMIS-780 Commit: b08b91a32faa89cdff4403b532e60d96084f2d4a Parents: ad60278 Author: bayern39 <[email protected]> Authored: Wed Oct 19 09:50:19 2016 +0800 Committer: Clebert Suconic <[email protected]> Committed: Wed Oct 19 15:37:02 2016 -0400 ---------------------------------------------------------------------- .../activemq/artemis/core/server/ActiveMQMessageBundle.java | 3 +++ .../activemq/artemis/core/server/ActiveMQServerLogger.java | 4 ---- .../activemq/artemis/core/server/impl/ActiveMQServerImpl.java | 4 +--- 3 files changed, 4 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b08b91a3/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQMessageBundle.java ---------------------------------------------------------------------- diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQMessageBundle.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQMessageBundle.java index b293406..c87bd11 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQMessageBundle.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQMessageBundle.java @@ -104,6 +104,9 @@ public interface ActiveMQMessageBundle { value = "Did not receive data from {0} within the {1}ms connection TTL. The connection will now be closed.", format = Message.Format.MESSAGE_FORMAT) ActiveMQConnectionTimedOutException clientExited(String remoteAddress, long ttl); + @Message(id = 119015, value = "Must specify a name for each divert. This one will not be deployed.", format = Message.Format.MESSAGE_FORMAT) + ActiveMQInternalErrorException divertWithNoName(); + @Message(id = 119017, value = "Queue {0} does not exist", format = Message.Format.MESSAGE_FORMAT) ActiveMQNonExistentQueueException noSuchQueue(SimpleString queueName); http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b08b91a3/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQServerLogger.java ---------------------------------------------------------------------- diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQServerLogger.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQServerLogger.java index f6b3248..ae07a8f 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQServerLogger.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQServerLogger.java @@ -347,10 +347,6 @@ public interface ActiveMQServerLogger extends BasicLogger { void timedOutStoppingThreadpool(ExecutorService service); @LogMessage(level = Logger.Level.WARN) - @Message(id = 222003, value = "Must specify a name for each divert. This one will not be deployed.", format = Message.Format.MESSAGE_FORMAT) - void divertWithNoName(); - - @LogMessage(level = Logger.Level.WARN) @Message(id = 222004, value = "Must specify an address for each divert. This one will not be deployed.", format = Message.Format.MESSAGE_FORMAT) void divertWithNoAddress(); http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b08b91a3/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 2c3add2..98abce0 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 @@ -1649,9 +1649,7 @@ public class ActiveMQServerImpl implements ActiveMQServer { @Override public void deployDivert(DivertConfiguration config) throws Exception { if (config.getName() == null) { - ActiveMQServerLogger.LOGGER.divertWithNoName(); - - return; + throw ActiveMQMessageBundle.BUNDLE.divertWithNoName(); } if (config.getAddress() == null) {
