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

   Fixes [CAMEL-26125](https://issues.apache.org/jira/browse/CAMEL-26125).
   
   ## The insert operation dropped every incoming header
   
   **What was wrong:** `JcrProducer.process` set the identifier of the new node 
with `exchange.getOut().setBody(...)`. That creates a new out message with no 
headers, so after a `jcr` insert every header of the incoming message was gone.
   
   **What changed:** it now uses `exchange.getMessage().setBody(...)`, so the 
body becomes the node identifier and the headers stay. The get-by-id operation 
already wrote to the in message and is not changed.
   
   **Tests:** new `JcrProducerTest.testInsertKeepsHeaders` (in-memory 
Jackrabbit) checks that a custom header, the stored property header and 
`CamelJcrNodeName` are still on the message after the insert, and that the body 
is the node identifier. It failed before the fix (`expected: <myValue> but was: 
<null>`). The module suite passes: 16 tests, 0 failures, with `-Psourcecheck`.
   
   **Docs:** an entry in the 4.24 upgrade guide, because the `CamelJcr*` 
headers now stay on the message too and a later `jcr` producer in the same 
route sees them. No option or header changed, so nothing is regenerated.
   
   _Claude Code on behalf of Claus Ibsen (davsclaus)_
   
   🤖 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