davsclaus opened a new pull request, #28166: URL: https://github.com/apache/camel/pull/28166
## Backport of #28141 Cherry-pick of #28141 onto `camel-4.18.x` (clean, no changes). #28141 is approved by the review bot and green, but not merged yet. **Original PR:** #28141 - CAMEL-25860: camel-core - pollEnrich: after a timeout, the body stays null also for a message that creates its body on demand **Jira:** https://issues.apache.org/jira/browse/CAMEL-25860 **Target branch:** `camel-4.18.x` The bug is on this branch too. After a pollEnrich timeout, `CopyAggregationStrategy` sets the body to null. But `MessageSupport.getBody()` calls `createBody()` for a null body, and a message that creates its body on demand gives its own payload back. That includes the messages of the file, JMS, mail and HTTP consumers. So a route that consumes files got its own file back as the body, or in the `variableReceive` variable, instead of null. Tests on `camel-4.18.x`: the camel-core enricher and poll tests pass (73), including the new `PollEnrichTimeoutFileBodyTest` (3). _Claude Code on behalf of davsclaus_ 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01STT6whBgK1AqsSsUKrnE8m -- 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]
