mayurbm commented on PR #25554:
URL: https://github.com/apache/camel/pull/25554#issuecomment-5425409042

   Hi @gnodet, thank you for the detailed re-review!
   
   **On comment 1 (unconditional vs conditional wrapping):**
   
   We are intentionally keeping the narrow, conditional approach here — 
wrapping only when `e.getMessage()` is null/blank — rather than matching the 
unconditional pattern from `RouteService.warmUp()`/`setUp()`.
   
   The reason is that @davsclaus explicitly reviewed this PR and flagged that 
unconditional wrapping is broader than the reported bug needs. His exact 
feedback was:
   
   > *"This now wraps every exception from consumer/route-service start, not 
just the null-message case CAMEL-24404 describes. The three 
SupervisingRouteController tests broke precisely because this is broader than 
the reported bug needs."*
   
   Following that guidance, the fix was narrowed to only the case CAMEL-24404 
describes: a consumer start exception that carries a null or blank message 
(e.g. a bare `NullPointerException`). Exceptions that already have a message 
propagate unchanged, preserving existing caller behaviour and avoiding the test 
breakage.
   
   **On comment 2 (`getMessage()` vs `getLocalizedMessage()`):**
   
   Acknowledged — `extractUsefulMessage` uses `getLocalizedMessage()` while the 
null guard uses `getMessage()`. In practice these are the same for standard JDK 
exceptions, but for completeness this could be aligned in a follow-up. Happy to 
address if you feel it is worth the change.
   
   Local validation with current narrow approach:
   - `mvn formatter:format impsort:sort` — no changes needed
   - `InternalRouteStartupManagerConsumerStartTest`: Tests run: 3, Failures: 0
   - `DefaultSupervisingRouteControllerTest`: Tests run: 2, Failures: 0
   - `MainSupervisingRouteControllerTest`: Tests run: 3, Failures: 0


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