You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Otavio Rodolfo Piske (Jira)" <ji...@apache.org> on 2022/07/25 11:55:00 UTC

[jira] [Resolved] (CAMEL-17760) camel-core: consolidate copy-exchange-if-capable logic

     [ https://issues.apache.org/jira/browse/CAMEL-17760?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Otavio Rodolfo Piske resolved CAMEL-17760.
------------------------------------------
    Resolution: Fixed

Resolved with the linked PR.

> 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
>            Priority: Major
>             Fix For: 3.x
>
>
> 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.10#820010)