[
https://issues.apache.org/activemq/browse/CAMEL-1384?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claus Ibsen reassigned CAMEL-1384:
----------------------------------
Assignee: Claus Ibsen
> ExchangeHelper should respect ExchangePattern.InOptionalOut
> ------------------------------------------------------------
>
> Key: CAMEL-1384
> URL: https://issues.apache.org/activemq/browse/CAMEL-1384
> Project: Apache Camel
> Issue Type: Bug
> Components: camel-core
> Affects Versions: 1.6.0
> Environment: ActiveMQ/Camel
> Reporter: Michael Chen
> Assignee: Claus Ibsen
> Fix For: 2.0.0
>
>
> The utility method org.apache.camel.util.ExchangeHelper.copyResults() is use
> by many core classes. However, this method does not properly support MEP
> InOptionalOut.
> Assuming in an InOptionalOut exchange, having no out message means just that
> -- no out message should be sent, then the following lines in this method
> {code}//
> Message out = source.getOut(false);
> if (out != null) {
> result.getOut(true).copyFrom(out);
> } else {
> // no results so lets copy the last input
> {code}
> should be changed to:
> {code}//
> Message out = source.getOut(false);
> if (out != null) {
> result.getOut(true).copyFrom(out);
> } else if (result.getPattern() == ExchangePattern.InOptionalOut) {
> result.setOut(null);
> } else {
> // no results so lets copy the last input
> {code}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.