activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [2/2] activemq git commit: AMQ-6402: Fixed potential NPE in OriginalDestinationPropagateStrategy
Date Sat, 20 Aug 2016 10:16:41 GMT
AMQ-6402: Fixed potential NPE in OriginalDestinationPropagateStrategy


Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/853e8006
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/853e8006
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/853e8006

Branch: refs/heads/activemq-5.14.x
Commit: 853e80063bd51409ac646b034b99ac934e4d1870
Parents: 124bd1a
Author: Claus Ibsen <claus.ibsen@gmail.com>
Authored: Sat Aug 20 12:13:55 2016 +0200
Committer: Claus Ibsen <claus.ibsen@gmail.com>
Committed: Sat Aug 20 12:16:31 2016 +0200

----------------------------------------------------------------------
 .../camel/component/OriginalDestinationPropagateStrategy.java      | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/853e8006/activemq-camel/src/main/java/org/apache/activemq/camel/component/OriginalDestinationPropagateStrategy.java
----------------------------------------------------------------------
diff --git a/activemq-camel/src/main/java/org/apache/activemq/camel/component/OriginalDestinationPropagateStrategy.java
b/activemq-camel/src/main/java/org/apache/activemq/camel/component/OriginalDestinationPropagateStrategy.java
index 84de369..8f4c9fd 100644
--- a/activemq-camel/src/main/java/org/apache/activemq/camel/component/OriginalDestinationPropagateStrategy.java
+++ b/activemq-camel/src/main/java/org/apache/activemq/camel/component/OriginalDestinationPropagateStrategy.java
@@ -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();


Mime
View raw message