You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by js...@apache.org on 2006/10/03 16:26:38 UTC
svn commit: r452507 -
/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageProducer.java
Author: jstrachan
Date: Tue Oct 3 07:26:38 2006
New Revision: 452507
URL: http://svn.apache.org/viewvc?view=rev&rev=452507
Log:
added an explicit check that the destination is not null to prevent cryptic exception messages from the broker
Modified:
incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageProducer.java
Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageProducer.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageProducer.java?view=diff&rev=452507&r1=452506&r2=452507
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageProducer.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageProducer.java Tue Oct 3 07:26:38 2006
@@ -458,6 +458,9 @@
} 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();