mirror of https://github.com/apache/activemq.git
Fix for potential NPE
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1493110 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
8ab1934520
commit
205c6bec88
|
@ -348,8 +348,11 @@ class AmqpProtocolConverter {
|
||||||
MessageDispatch md = (MessageDispatch) command;
|
MessageDispatch md = (MessageDispatch) command;
|
||||||
ConsumerContext consumerContext = subscriptionsByConsumerId.get(md.getConsumerId());
|
ConsumerContext consumerContext = subscriptionsByConsumerId.get(md.getConsumerId());
|
||||||
if (consumerContext != null) {
|
if (consumerContext != null) {
|
||||||
if (LOG.isTraceEnabled()) {
|
// End of Queue Browse will have no Message object.
|
||||||
|
if (LOG.isTraceEnabled() && md.getMessage() != null) {
|
||||||
LOG.trace("Dispatching MessageId:{} to consumer", md.getMessage().getMessageId());
|
LOG.trace("Dispatching MessageId:{} to consumer", md.getMessage().getMessageId());
|
||||||
|
} else {
|
||||||
|
LOG.trace("Dispatching End of Browse Command to consumer {}", md.getConsumerId());
|
||||||
}
|
}
|
||||||
consumerContext.onMessageDispatch(md);
|
consumerContext.onMessageDispatch(md);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue