gnodet-bot commented on code in PR #28147:
URL: https://github.com/apache/camel/pull/28147#discussion_r4371910532
##########
core/camel-core-processor/src/main/java/org/apache/camel/processor/errorhandler/RedeliveryErrorHandler.java:
##########
@@ -860,6 +860,15 @@ private void runNotAllowed() {
LOG.trace("Run not allowed, will reject executing exchange: {}",
exchange);
if (exchange.getException() == null) {
exchange.setException(new
RouteStoppingException(notAllowedReason()));
+ } else if (logger != null &&
!exchange.getExchangeExtension().isInterrupted()) {
+ // log the cut-off WARN when the exchange already has a
RouteStoppingException and
Review Comment:
**Nit:** The comment says _"when the exchange already has a
`RouteStoppingException`"_ but the `else if` condition only checks
`exchange.getException() != null`. The actual `RouteStoppingException` type
check lives inside `logCutOffByRouteStop()`. This is correct behavior — a
non-`RouteStoppingException` causes `logCutOffByRouteStop()` to return `false`
harmlessly — but the comment slightly misrepresents where the guard is.
Consider: `// log the cut-off WARN when the exchange already has an exception
(logCutOffByRouteStop guards for instanceof RouteStoppingException)`.
--
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]