You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Willem Jiang (JIRA)" <ji...@apache.org> on 2009/08/28 14:25:18 UTC
[jira] Resolved: (CAMEL-1955) MessageSupport.copyFrom() doesn't
clean the message header and the attachments
[ https://issues.apache.org/activemq/browse/CAMEL-1955?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Willem Jiang resolved CAMEL-1955.
---------------------------------
Resolution: Fixed
trunk
http://svn.apache.org/viewvc?rev=808857&view=rev
camel 1.x branch
http://svn.apache.org/viewvc?rev=808856&view=rev
> MessageSupport.copyFrom() doesn't clean the message header and the attachments
> ------------------------------------------------------------------------------
>
> Key: CAMEL-1955
> URL: https://issues.apache.org/activemq/browse/CAMEL-1955
> Project: Apache Camel
> Issue Type: Bug
> Components: camel-core
> Affects Versions: 1.5.0, 1.6.0, 2.0-M1, 1.6.1, 2.0-M2, 2.0-M3, 2.0.0
> Reporter: Willem Jiang
> Assignee: Willem Jiang
> Fix For: 1.6.2, 2.1.0
>
>
> If the we want to clean up the attachment in the pipeline processor, we will hit this bug.
> {code}
> from("direct:start")
> .process(new Processor() {
> public void process(Exchange exchange) throws Exception {
> exchange.getOut().copyFrom(exchange.getIn());
> //Added the header and attachment
> exchange.getOut().setHeader("test", "testValue");
> exchange.getOut().addAttachment("test1.xml", new DataHandler(new FileDataSource("pom.xml")));
> }
> })
> .process(new Processor() {
> public void process(Exchange exchange) throws Exception {
> exchange.getOut().copyFrom(exchange.getIn());
> assertNotNull("The test attachment should not be null", exchange.getOut().getAttachment("test1.xml"));
> assertNotNull("The test header should not be null", exchange.getOut().getHeader("test"));
> exchange.getOut().removeAttachment("test1.xml");
> exchange.getOut().removeHeader("test");
> }
> });
> {code}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.