Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.6.0
-
None
-
ActiveMQ/Camel
Description
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
// Message out = source.getOut(false); if (out != null) { result.getOut(true).copyFrom(out); } else { // no results so lets copy the last input
should be changed to:
// 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
Attachments
Issue Links
- is depended upon by
-
CAMEL-1366 EndpointMessageListener should respect ExchangePattern
- Closed