activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject svn commit: r452507 - /incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageProducer.java
Date Tue, 03 Oct 2006 14:26:38 GMT
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();            



Mime
View raw message