From 4e1ec02590b821defbe3288dfc3551a4c2b18e08 Mon Sep 17 00:00:00 2001 From: James Strachan Date: Tue, 3 Oct 2006 14:26:38 +0000 Subject: [PATCH] added an explicit check that the destination is not null to prevent cryptic exception messages from the broker git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@452507 13f79535-47bb-0310-9956-ffa450edef68 --- .../main/java/org/apache/activemq/ActiveMQMessageProducer.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageProducer.java b/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageProducer.java index 3151b74ca1..1cd1eba87a 100755 --- a/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageProducer.java +++ b/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageProducer.java @@ -458,6 +458,9 @@ public class ActiveMQMessageProducer implements MessageProducer, StatsCapable, C } else { throw new UnsupportedOperationException("This producer can only send messages to: " + this.info.getDestination().getPhysicalName()); } + if (dest == null) { + throw new JMSException("No destination specified"); + } this.session.send(this, dest, message, deliveryMode, priority, timeToLive); stats.onMessage();