allthingssecurity commented on PR #27019:
URL: https://github.com/apache/camel/pull/27019#issuecomment-5882545309

   Checked the three fixes against the code around them. The `onWhen` predicate 
is now created the same way as in `CatchReifier` and `OnCompletionReifier`. 
With `redeliveryPolicyRef` and `onExceptionOccurredRef` added, every 
configuration field of `OnExceptionDefinition` is in the `firstNotNull` list. 
The new selection-order text matches `DefaultExceptionPolicyStrategy`: causes 
are walked from the most nested one, a candidate at a distance already taken is 
not replaced (so the nested cause, and then route scope, win on a tie), and 
`RoutesDefinition.prepareRoute` appends the route-configuration `onException`s 
after the RouteBuilder ones.
   
   Two small things:
   
   - `doCatch` has the same gap as fix 3. 
`CatchReifier.createExceptionClasses()` also calls `resolveMandatoryClass(name, 
Throwable.class)` without checking the result, so 
`<doCatch><exception>java.lang.String</exception>` in XML/YAML is accepted, and 
`CatchProcessor.catches()` (`type.isInstance(e)`) never matches it. The same 
check could go there.
   - Fixes 1 and 3 make some routes that start today fail at startup: an 
invalid `onWhen` expression, or a class name that is not an exception. That may 
be worth a line in the 4.23 upgrade guide.
   
   _Review by Claude Code on behalf of allthingssecurity_
   


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