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 2022/06/27 16:47:23 UTC

[camel] branch main updated: Fix example in pollEnrich eip doc (#7902)

This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/main by this push:
     new 4d1dcd2d227 Fix example in pollEnrich eip doc (#7902)
4d1dcd2d227 is described below

commit 4d1dcd2d2270a204957397800b508292394b3646
Author: Tomáš Turek <tt...@redhat.com>
AuthorDate: Mon Jun 27 18:47:16 2022 +0200

    Fix example in pollEnrich eip doc (#7902)
---
 .../src/main/docs/modules/eips/pages/pollEnrich-eip.adoc   | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/core/camel-core-engine/src/main/docs/modules/eips/pages/pollEnrich-eip.adoc b/core/camel-core-engine/src/main/docs/modules/eips/pages/pollEnrich-eip.adoc
index 67b10fbc53d..4a41fd1e8e5 100644
--- a/core/camel-core-engine/src/main/docs/modules/eips/pages/pollEnrich-eip.adoc
+++ b/core/camel-core-engine/src/main/docs/modules/eips/pages/pollEnrich-eip.adoc
@@ -82,13 +82,13 @@ public class ExampleAggregationStrategy implements AggregationStrategy {
         // this is just an example, for real-world use-cases the
         // aggregation strategy would be specific to the use-case
 
-        if (newExchange == null) {
-            return oldExchange;
+        if (resource == null) {
+            return original;
         }
-        Object oldBody = oldExchange.getIn().getBody();
-        Object newBody = newExchange.getIn().getBody();
-        oldExchange.getIn().setBody(oldBody + ":" + newBody);
-        return oldExchange;
+        Object oldBody = original.getIn().getBody();
+        Object newBody = resource.getIn().getBody();
+        original.getIn().setBody(oldBody + ":" + newBody);
+        return original;
     }
 
 }
@@ -118,7 +118,7 @@ In XML DSL you use `pollEnrich` as follows:
   <route>
     <from uri="direct:start"/>
     <pollEnrich timeout="10000" aggregationStrategy="myStrategy">
-      <constant>"file:inbox?fileName=data.txt"</constant>
+      <constant>file:inbox?fileName=data.txt</constant>
     </pollEnrich>
     <to uri="mock:result"/>
   </route>