Updated Branches: refs/heads/master 020c451a7 -> 050eef88e
CAMEL-6650: AggregationStrategy - Allow to use a pojo with no Camel API dependencies. Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/050eef88 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/050eef88 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/050eef88 Branch: refs/heads/master Commit: 050eef88e14e90a936a76ff188d40a93835b9448 Parents: 020c451 Author: Claus Ibsen <[email protected]> Authored: Fri Aug 23 08:39:09 2013 +0200 Committer: Claus Ibsen <[email protected]> Committed: Fri Aug 23 08:39:09 2013 +0200 ---------------------------------------------------------------------- .../main/java/org/apache/camel/model/MulticastDefinition.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/050eef88/camel-core/src/main/java/org/apache/camel/model/MulticastDefinition.java ---------------------------------------------------------------------- diff --git a/camel-core/src/main/java/org/apache/camel/model/MulticastDefinition.java b/camel-core/src/main/java/org/apache/camel/model/MulticastDefinition.java index 8730ce1..7c3cc3b 100644 --- a/camel-core/src/main/java/org/apache/camel/model/MulticastDefinition.java +++ b/camel-core/src/main/java/org/apache/camel/model/MulticastDefinition.java @@ -267,14 +267,14 @@ public class MulticastDefinition extends OutputDefinition<MulticastDefinition> i if (strategy == null && strategyRef != null) { Object aggStrategy = routeContext.lookup(strategyRef, Object.class); if (aggStrategy instanceof AggregationStrategy) { + strategy = (AggregationStrategy) aggStrategy; + } else if (aggStrategy != null) { AggregationStrategyBeanAdapter adapter = new AggregationStrategyBeanAdapter(aggStrategy, getStrategyMethodName()); if (getStrategyMethodAllowNull() != null) { adapter.setAllowNullNewExchange(getStrategyMethodAllowNull()); adapter.setAllowNullOldExchange(getStrategyMethodAllowNull()); } strategy = adapter; - } else if (aggStrategy != null) { - strategy = new AggregationStrategyBeanAdapter(aggStrategy, getStrategyMethodName()); } else { throw new IllegalArgumentException("Cannot find AggregationStrategy in Registry with name: " + strategyRef); }
