gnodet-bot commented on code in PR #29664:
URL: https://github.com/apache/camel/pull/29664#discussion_r4547381631
##########
components/camel-sanitizer/src/main/java/org/apache/camel/sanitizer/SanitizerContextServicePlugin.java:
##########
@@ -188,6 +203,8 @@ public void onRoutesRemove(Collection<Route> routes) {
public void onContextStopped(CamelContext context) {
Sanitizer s = sanitizer;
if (s != null) {
+ // the commits still in a copy that was never routed never run
+ s.contextStopped();
// the calls still pending when the context stops are listed
s.stopPendingCheck(reportOnShutdown);
}
Review Comment:
**[medium]** Prior review suggestion not applied — if `contextStopped()`
throws (e.g., a `recordCommit` → session assertion failure), `stopPendingCheck`
is skipped and pending R1 violations are silently lost.
```suggestion
if (s != null) {
try {
// the commits still in a copy that was never routed
never run
s.contextStopped();
} finally {
// the calls still pending when the context stops are
listed
s.stopPendingCheck(reportOnShutdown);
}
}
```
--
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]