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 b293406955..c87bd11ae1 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); 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 f6b324833c..ae07a8fe13 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 @@ -346,10 +346,6 @@ public interface ActiveMQServerLogger extends BasicLogger { @Message(id = 222002, value = "Timed out waiting for pool to terminate {0}. Interrupting all its threads!", format = Message.Format.MESSAGE_FORMAT) 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(); 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 2c3add24d4..98abce01eb 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) {