davsclaus opened a new pull request, #24930: URL: https://github.com/apache/camel/pull/24930
_Claude Code on behalf of davsclaus_ ## Summary - Fix copy-paste bug in `CxfMessageHelper.getCxfInMessage()` where the fallback branch (line 63) passed the null `body` variable instead of `message.getBody()`, causing non-InputStream message bodies (e.g. POJOs) to arrive as null content in downstream CXF interceptors - Add test coverage for the fallback branch with POJO and null bodies ## Details The bug has been dormant since 2011 because most Camel bodies have an `InputStream` type converter. The `else if` branch is only reachable when `body` (the `InputStream` variable) is null, so `answer.setContent(Object.class, body)` always set null. The fix changes it to `answer.setContent(Object.class, message.getBody())`. ## Test plan - [x] `testGetCxfInMessageWithPojoBody` — verifies a `List` body (no InputStream converter) is preserved via the fallback - [x] `testGetCxfInMessageWithNullBody` — verifies null body produces no content (no NPE) - [x] Existing `testGetCxfInMessage` — verifies String/DOMSource/File bodies still work via InputStream path 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.6 <[email protected]> -- 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]
