Repository: camel
Updated Branches:
  refs/heads/camel-2.17.x 709b87d69 -> 479a3fbd1


CAMEL-9887 Check for preCompletion on the delegated AggregationStrategy


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

Branch: refs/heads/camel-2.17.x
Commit: 479a3fbd1014fe77158ab463cb20aecc596dbb32
Parents: 709b87d
Author: Tomas Rohovsky <tomasrohov...@seznam.cz>
Authored: Mon Apr 25 12:20:32 2016 +0200
Committer: Claus Ibsen <davscl...@apache.org>
Committed: Mon Apr 25 12:49:27 2016 +0200

----------------------------------------------------------------------
 .../apache/camel/processor/aggregate/AggregateProcessor.java   | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/479a3fbd/camel-core/src/main/java/org/apache/camel/processor/aggregate/AggregateProcessor.java
----------------------------------------------------------------------
diff --git 
a/camel-core/src/main/java/org/apache/camel/processor/aggregate/AggregateProcessor.java
 
b/camel-core/src/main/java/org/apache/camel/processor/aggregate/AggregateProcessor.java
index d094249..036c45a 100644
--- 
a/camel-core/src/main/java/org/apache/camel/processor/aggregate/AggregateProcessor.java
+++ 
b/camel-core/src/main/java/org/apache/camel/processor/aggregate/AggregateProcessor.java
@@ -1273,7 +1273,11 @@ public class AggregateProcessor extends ServiceSupport 
implements AsyncProcessor
 
     @Override
     protected void doStart() throws Exception {
-        if (aggregationStrategy instanceof 
PreCompletionAwareAggregationStrategy) {
+        AggregationStrategy strategy = aggregationStrategy;
+        if (strategy instanceof DelegateAggregationStrategy) {
+            strategy = ((DelegateAggregationStrategy) strategy).getDelegate();
+        }
+        if (strategy instanceof PreCompletionAwareAggregationStrategy) {
             preCompletion = true;
             LOG.info("PreCompletionAwareAggregationStrategy detected. 
Aggregator {} is in pre-completion mode.", getId());
         }

Reply via email to