You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2015/07/08 08:33:17 UTC

[5/5] camel git commit: Added set of fromEndpoint in producing exchanges to prevent a NPE using the component through camel uri binding in switchyard

Added set of fromEndpoint in producing exchanges to prevent a NPE using the component through camel uri binding in switchyard


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

Branch: refs/heads/camel-2.14.x
Commit: ad675c18ce23dfae2641c7efc31f702bd4b24573
Parents: f9245e2
Author: Andrea Tarocchi <at...@redhat.com>
Authored: Wed Jul 8 00:15:54 2015 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Wed Jul 8 08:39:21 2015 +0200

----------------------------------------------------------------------
 .../org/apache/camel/component/jt400/Jt400DataQueueConsumer.java   | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/ad675c18/components/camel-jt400/src/main/java/org/apache/camel/component/jt400/Jt400DataQueueConsumer.java
----------------------------------------------------------------------
diff --git a/components/camel-jt400/src/main/java/org/apache/camel/component/jt400/Jt400DataQueueConsumer.java b/components/camel-jt400/src/main/java/org/apache/camel/component/jt400/Jt400DataQueueConsumer.java
index 3d7769e..8ed3776 100644
--- a/components/camel-jt400/src/main/java/org/apache/camel/component/jt400/Jt400DataQueueConsumer.java
+++ b/components/camel-jt400/src/main/java/org/apache/camel/component/jt400/Jt400DataQueueConsumer.java
@@ -109,6 +109,7 @@ public class Jt400DataQueueConsumer extends PollingConsumerSupport {
         }
 
         Exchange exchange = new DefaultExchange(endpoint.getCamelContext());
+        exchange.setFromEndpoint(endpoint);
         if (entry != null) {
             exchange.getIn().setHeader(Jt400DataQueueEndpoint.SENDER_INFORMATION, entry.getSenderInformation());
             if (endpoint.getFormat() == Format.binary) {
@@ -135,6 +136,7 @@ public class Jt400DataQueueConsumer extends PollingConsumerSupport {
         }
 
         Exchange exchange = new DefaultExchange(endpoint.getCamelContext());
+        exchange.setFromEndpoint(endpoint);
         if (entry != null) {
             exchange.getIn().setHeader(Jt400DataQueueEndpoint.SENDER_INFORMATION, entry.getSenderInformation());
             if (endpoint.getFormat() == Format.binary) {