Return-Path: X-Original-To: apmail-camel-issues-archive@minotaur.apache.org Delivered-To: apmail-camel-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2F2B210A94 for ; Wed, 5 Feb 2014 11:00:15 +0000 (UTC) Received: (qmail 8751 invoked by uid 500); 5 Feb 2014 11:00:13 -0000 Delivered-To: apmail-camel-issues-archive@camel.apache.org Received: (qmail 7973 invoked by uid 500); 5 Feb 2014 11:00:11 -0000 Mailing-List: contact issues-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list issues@camel.apache.org Received: (qmail 7946 invoked by uid 99); 5 Feb 2014 11:00:10 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Feb 2014 11:00:10 +0000 Date: Wed, 5 Feb 2014 11:00:10 +0000 (UTC) From: "Claus Ibsen (JIRA)" To: issues@camel.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Assigned] (CAMEL-7167) AbstractListAggregationStrategy : at the end of the split, the body is not replaced by the agregated list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CAMEL-7167?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Claus Ibsen reassigned CAMEL-7167: ---------------------------------- Assignee: Claus Ibsen > AbstractListAggregationStrategy : at the end of the split, the body is not replaced by the agregated list > --------------------------------------------------------------------------------------------------------- > > Key: CAMEL-7167 > URL: https://issues.apache.org/jira/browse/CAMEL-7167 > Project: Camel > Issue Type: Bug > Components: camel-core > Affects Versions: 2.12.1 > Reporter: Yves De Moor > Assignee: Claus Ibsen > Priority: Minor > > Using a class that extends AbstractListAggregationStrategy to rebuild a List after the completion of the split cause the body not to be replaced by the agregated list at the end of the split. > In other words (AbstractListAggregationStrategy.onCompletion(Exchange exchange) is never called. > Here is what I do : > from(HANDLE_A_LIST)// > .split(body(), new ListAggregationStrategy())// body is an arrayList of String > .to("log:foo")// > .end()// end split > // the body is a string instead of a List > .end()// end route > > class ListAggregationStrategy extends AbstractListAggregationStrategy > { > @Override > public String getValue(Exchange exchange) > { > return exchange.getIn().getBody(); > } > } > As workaround, I use .setBody(property(Exchange.GROUPED_EXCHANGE)) after the end of the split. -- This message was sent by Atlassian JIRA (v6.1.5#6160)