Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-17760

camel-core: consolidate copy-exchange-if-capable logic

    XMLWordPrintableJSON

Details

    • Task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.15.0
    • 3.x
    • camel-core
    • None
    • Unknown

    Description

      We have lots of code doing this:

       

      if (exchange.getPattern().isOutCapable()) {
          exchange.getOut().copyFrom(exchange.getIn());
          exchange.getOut().setBody(body);
      } else {
          exchange.getIn().setBody(body);
      }

       

      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.

      Attachments

        Issue Links

          Activity

            People

              orpiske Otavio Rodolfo Piske
              orpiske Otavio Rodolfo Piske
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: