Repository: camel Updated Branches: refs/heads/master 3c3202eab -> 45c375c38
Fix over writing previous addToResult calls I noticed that multiple calls to the addToResult method in the org.apache.camel.component.aws.ddb.AbstractDdbCommand within the child class org.apache.camel.component.aws.ddb.ScanCommand caused the next call to over write the previous calls to addToResult in the header results. The end result is only having the last result value returned in the out message which is the SCANNED_COUNT header. The exchange.getOut() already passes back the "In" Message or creates a new Message object if no out message exists does not need to copy over the "In" message into the "Out" message. Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/45c375c3 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/45c375c3 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/45c375c3 Branch: refs/heads/master Commit: 45c375c38e1a02347c17d172a6bd7dc68aebcdd4 Parents: 9c076c3 Author: Won <git...@urbanenomad.com> Authored: Tue Apr 26 10:09:18 2016 -0700 Committer: Claus Ibsen <davscl...@apache.org> Committed: Wed Apr 27 07:37:31 2016 +0200 ---------------------------------------------------------------------- .../org/apache/camel/component/aws/common/AwsExchangeUtil.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/45c375c3/components/camel-aws/src/main/java/org/apache/camel/component/aws/common/AwsExchangeUtil.java ---------------------------------------------------------------------- diff --git a/components/camel-aws/src/main/java/org/apache/camel/component/aws/common/AwsExchangeUtil.java b/components/camel-aws/src/main/java/org/apache/camel/component/aws/common/AwsExchangeUtil.java index 8c9eb95..ef23244 100644 --- a/components/camel-aws/src/main/java/org/apache/camel/component/aws/common/AwsExchangeUtil.java +++ b/components/camel-aws/src/main/java/org/apache/camel/component/aws/common/AwsExchangeUtil.java @@ -26,9 +26,7 @@ public final class AwsExchangeUtil { public static Message getMessageForResponse(final Exchange exchange) { if (exchange.getPattern().isOutCapable()) { - Message out = exchange.getOut(); - out.copyFrom(exchange.getIn()); - return out; + return exchange.getOut(); } return exchange.getIn(); }