mirror of https://github.com/apache/activemq.git
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
This commit is contained in:
parent
8d42a5af7f
commit
4e1ec02590
|
@ -458,6 +458,9 @@ public class ActiveMQMessageProducer implements MessageProducer, StatsCapable, C
|
||||||
} else {
|
} else {
|
||||||
throw new UnsupportedOperationException("This producer can only send messages to: " + this.info.getDestination().getPhysicalName());
|
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);
|
this.session.send(this, dest, message, deliveryMode, priority, timeToLive);
|
||||||
stats.onMessage();
|
stats.onMessage();
|
||||||
|
|
Loading…
Reference in New Issue