Otavio Rodolfo Piske created CAMEL-17760:
--------------------------------------------
Summary: camel-core: consolidate copy-exchange-if-capable logic
Key: CAMEL-17760
URL: https://issues.apache.org/jira/browse/CAMEL-17760
Project: Camel
Issue Type: Task
Components: camel-core
Affects Versions: 3.15.0
Reporter: Otavio Rodolfo Piske
Assignee: Otavio Rodolfo Piske
Fix For: 3.17.0
We have lots of code doing this:
{code:java}
if (exchange.getPattern().isOutCapable()) {
exchange.getOut().copyFrom(exchange.getIn());
exchange.getOut().setBody(body);
} else {
exchange.getIn().setBody(body);
}{code}
Because getOut is deprecated, this generates a lot of warnings. We can
consolidate this logic in the ExchangeHelper class to simplify cleaning it up
in the future.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)