mayurbm commented on PR #25554: URL: https://github.com/apache/camel/pull/25554#issuecomment-5450453553
@davsclaus Thank you for the detailed investigation — you are correct that `testRouteServiceStartNullMessageProducesFailedToStartRouteException` was hitting the first catch site, not the second. Added a new test `testRoutePolicyOnStartProducesFailedToStartRouteException` that genuinely exercises the second catch site (`routeService.start()`): - Uses a `RoutePolicy` whose `onStart()` throws a bare `NullPointerException` - The policy callback is invoked from `DefaultRoute.doStart()` → `routePolicyCallback(RoutePolicy::onStart)`, which runs inside `routeService.start()` — the second catch block - The consumer starts successfully, so the exception cannot be caught by the first catch site - Verifies `FailedToStartRouteException` is thrown with the route id in the message All impacted modules tested locally with JDK 21 (camel-core, camel-main, camel-spring-xml, camel-netty-http, camel-jms, camel-mybatis, camel-ai-tool) — all pass. Regarding the minor points: - PR description updated to reflect 4 test methods (not 2) - Corrected the description to clarify the fix reuses the existing `RouteService.extractUsefulMessage()` from #25205 rather than adding a new one _Claude Code on behalf of mayurbm_ -- 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]
