From 0c2c5c6a19aee93a8f08b59d04d43d198227b68f Mon Sep 17 00:00:00 2001 From: James Strachan Date: Tue, 4 Jul 2006 11:54:24 +0000 Subject: [PATCH] spring cleaning; catch bad ackMode configurations and throw an exception git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@418987 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/activemq/transport/stomp/Subscription.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/activemq-core/src/main/java/org/apache/activemq/transport/stomp/Subscription.java b/activemq-core/src/main/java/org/apache/activemq/transport/stomp/Subscription.java index 7b2bde17ce..fdbfc6919b 100644 --- a/activemq-core/src/main/java/org/apache/activemq/transport/stomp/Subscription.java +++ b/activemq-core/src/main/java/org/apache/activemq/transport/stomp/Subscription.java @@ -70,6 +70,9 @@ public class Subscription { MessageAck ack = new MessageAck(md, MessageAck.STANDARD_ACK_TYPE, 1); format.enqueueCommand(ack); } + else { + throw new JMSException("Unknown ackMode: " + ackMode); + } FrameBuilder builder = new FrameBuilder(Stomp.Responses.MESSAGE);