oscerd opened a new pull request, #29069:
URL: https://github.com/apache/camel/pull/29069

   Fixes [CAMEL-26226](https://issues.apache.org/jira/browse/CAMEL-26226), 
found while adding the catalog body types (CAMEL-24961).
   
   ## 1. `exchange.getMessage().copyFrom(exchange.getIn())` is a no-op
   
   **Was:** `CassandraProducer.process` called 
`exchange.getMessage().copyFrom(exchange.getIn())` with the comment "copy the 
header of in message to the out message". The line came from 
`exchange.getOut().copyFrom(exchange.getIn())`, which kept the headers when 
`getOut()` created a new, empty out message, and became a copy of the message 
onto itself when `getOut()` was replaced with `getMessage()`. With no out 
message, `getMessage()` is the in message, so the call did nothing. The routing 
engine moves an out message to the in before each step, so the producer never 
gets one.
   
   **Now:** The line is removed. The producer runs the query with the in 
message and sets the result on the message as before, so the headers are kept 
as before.
   
   ## Tests
   
   There is nothing to test beyond the module suite: the line copied the 
message onto itself, so no test can tell it apart. Module: 8 tests, 0 failures 
(the integration tests need Cassandra in a container and were not run).
   
   ## Docs and generated files
   
   None: no option, header, body type or page changed.
   
   ## Not changed
   
   Nothing else in the producer.
   
   Main only, as the other fixes of the CAMEL-24961 follow-ups.
   
   _Claude Code on behalf of Andrea Cosentino (oscerd)_
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to