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

   ## Description
   
   When `UnmarshalProcessor` is configured with `allowNullBody=true` and the 
input body is `null`, the processor skips unmarshalling but does not copy the 
input message to the output message. As a result, existing headers are lost.
   
   This change copies the input message to the output message in the null-body 
path, preserving headers while keeping the body `null`.
   
   ## Changes
   - Copy the input message to the output message when the body is `null` and 
`allowNullBody` is enabled.
   - Extend `testAllowNullBody` to verify that message headers are preserved.
   
   ## Testing
   
   Verified with:
   
   ```bash
   mvn -pl core/camel-core -am 
"-Dtest=UnmarshalProcessorTest#testAllowNullBody" 
"-Dsurefire.failIfNoSpecifiedTests=false" clean test
   ```
   
   The test passes with the fix applied.


-- 
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