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/12/14 18:00:47 UTC

[camel] branch main updated (29b55273dc6 -> 6acb68e1adf)

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

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


    from 29b55273dc6 CAMEL-18739 fix by handing over the completion to the original exchange (#8795)
     new d08b7b380af CAMEL-18739 fix by handing over the completion to the original exchange (#8795)
     new 6acb68e1adf CAMEL-18739 fix by handing over the completion to the original exchange (#8795)

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../camel/processor/aggregate/tarfile/TarAggregationStrategy.java | 8 ++++++++
 .../camel/processor/aggregate/zipfile/ZipAggregationStrategy.java | 8 ++++++++
 .../main/java/org/apache/camel/processor/MulticastProcessor.java  | 5 ++---
 3 files changed, 18 insertions(+), 3 deletions(-)


[camel] 02/02: CAMEL-18739 fix by handing over the completion to the original exchange (#8795)

Posted by da...@apache.org.
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

commit 6acb68e1adf325cd069c8a5c12f99124d8dc54dd
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Wed Dec 14 18:59:13 2022 +0100

    CAMEL-18739 fix by handing over the completion to the original exchange (#8795)
---
 .../camel/processor/aggregate/tarfile/TarAggregationStrategy.java | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/components/camel-tarfile/src/main/java/org/apache/camel/processor/aggregate/tarfile/TarAggregationStrategy.java b/components/camel-tarfile/src/main/java/org/apache/camel/processor/aggregate/tarfile/TarAggregationStrategy.java
index 82b97315aef..76710b322dd 100644
--- a/components/camel-tarfile/src/main/java/org/apache/camel/processor/aggregate/tarfile/TarAggregationStrategy.java
+++ b/components/camel-tarfile/src/main/java/org/apache/camel/processor/aggregate/tarfile/TarAggregationStrategy.java
@@ -197,6 +197,14 @@ public class TarAggregationStrategy implements AggregationStrategy {
         return answer;
     }
 
+    @Override
+    public void onCompletion(Exchange exchange, Exchange inputExchange) {
+        // this aggregation strategy added onCompletion which we should handover when we are complete
+        if (inputExchange != null) {
+            exchange.adapt(ExtendedExchange.class).handoverCompletions(inputExchange);
+        }
+    }
+
     private void addFileToTar(File source, File file, String fileName) throws IOException, ArchiveException {
         File tmpTar = Files.createTempFile(parentDir.toPath(), source.getName(), null).toFile();
         tmpTar.delete();


[camel] 01/02: CAMEL-18739 fix by handing over the completion to the original exchange (#8795)

Posted by da...@apache.org.
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

commit d08b7b380af65e7ed85458ada13a0f78f29db62d
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Wed Dec 14 18:53:21 2022 +0100

    CAMEL-18739 fix by handing over the completion to the original exchange (#8795)
---
 .../camel/processor/aggregate/zipfile/ZipAggregationStrategy.java | 8 ++++++++
 .../main/java/org/apache/camel/processor/MulticastProcessor.java  | 5 ++---
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/components/camel-zipfile/src/main/java/org/apache/camel/processor/aggregate/zipfile/ZipAggregationStrategy.java b/components/camel-zipfile/src/main/java/org/apache/camel/processor/aggregate/zipfile/ZipAggregationStrategy.java
index e2a5880b9f7..4d9a0448a93 100644
--- a/components/camel-zipfile/src/main/java/org/apache/camel/processor/aggregate/zipfile/ZipAggregationStrategy.java
+++ b/components/camel-zipfile/src/main/java/org/apache/camel/processor/aggregate/zipfile/ZipAggregationStrategy.java
@@ -216,6 +216,14 @@ public class ZipAggregationStrategy implements AggregationStrategy {
         return answer;
     }
 
+    @Override
+    public void onCompletion(Exchange exchange, Exchange inputExchange) {
+        // this aggregation strategy added onCompletion which we should handover when we are complete
+        if (inputExchange != null) {
+            exchange.adapt(ExtendedExchange.class).handoverCompletions(inputExchange);
+        }
+    }
+
     private static void newZipFile(File zipFile) throws URISyntaxException, IOException {
         if (zipFile.exists() && !zipFile.delete()) { //Delete, because ZipFileSystem needs to create file on its own (with correct END bytes in the file)
             throw new IOException("Cannot delete file " + zipFile);
diff --git a/core/camel-core-processor/src/main/java/org/apache/camel/processor/MulticastProcessor.java b/core/camel-core-processor/src/main/java/org/apache/camel/processor/MulticastProcessor.java
index e7f5c2d2fc2..af740f9b1c2 100644
--- a/core/camel-core-processor/src/main/java/org/apache/camel/processor/MulticastProcessor.java
+++ b/core/camel-core-processor/src/main/java/org/apache/camel/processor/MulticastProcessor.java
@@ -767,7 +767,7 @@ public class MulticastProcessor extends AsyncProcessorSupport
      * @param pairs        the pairs with the exchanges to process
      * @param callback     the callback
      * @param doneSync     the <tt>doneSync</tt> parameter to call on callback
-     * @param forceExhaust whether or not error handling is exhausted
+     * @param forceExhaust whether error handling is exhausted
      */
     protected void doDone(
             Exchange original, Exchange subExchange, final Iterable<ProcessorExchangePair> pairs,
@@ -800,9 +800,8 @@ public class MulticastProcessor extends AsyncProcessorSupport
                 // if we stopped due an exception then only propagate the exception
                 original.setException(subExchange.getException());
             } else {
-                // copy the current result to original so it will contain this result of this eip
+                // copy the current result to original, so it will contain this result of this eip
                 ExchangeHelper.copyResults(original, subExchange);
-                subExchange.adapt(ExtendedExchange.class).handoverCompletions(original);
             }
         }