davsclaus opened a new pull request, #30540: URL: https://github.com/apache/camel/pull/30540
`SearchTermBuilder.receivedNow(Comparison comparison, long offset)` called `sentNow(...)`, so it built a `NowSearchTerm` on the sent date instead of the received date. The overload that takes an `Op` was already correct, and the two-argument overload now delegates to it. Nothing in Camel calls this method: the `searchTerm.fromReceivedDate`/`toReceivedDate` URI options build their `NowSearchTerm` in `MailConverters` directly, so only Java code that uses the builder is affected. Found while reviewing #30537 (camel-mail: fixed-date search terms with seconds). **Test:** `SearchTermBuilderTest.testSearchTermReceivedLast24Hours` uses two messages: one received now and sent two days ago, and one sent now and received two days ago. It fails without the fix and passes with it. _Claude Code on behalf of 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]
