AMQ-6402: Fixed potential NPE in OriginalDestinationPropagateStrategy

This commit is contained in:
Claus Ibsen 2016-08-20 12:13:55 +02:00
parent b37b9eb5af
commit 8447e1af2d
1 changed files with 1 additions and 1 deletions

View File

@ -40,7 +40,7 @@ public class OriginalDestinationPropagateStrategy implements MessageCreatedStrat
if (exchange.getIn() instanceof JmsMessage) {
JmsMessage msg = exchange.getIn(JmsMessage.class);
Message jms = msg.getJmsMessage();
if (message instanceof ActiveMQMessage) {
if (jms != null && jms instanceof ActiveMQMessage && message instanceof ActiveMQMessage) {
ActiveMQMessage amq = (ActiveMQMessage) jms;
if (amq.getOriginalDestination() == null) {
ActiveMQDestination from = amq.getDestination();