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

   Thanks for tracing it so closely.
   
   1. `from`: yes, it was there mainly so the method could overload the 2-arg 
one with a different return type. Camel never reads it, and the listener 
already gets the handing-over exchange from `AbstractExchange`. I'll rename the 
method to `handoverSynchronizationWithResult(Exchange target, 
Predicate<Synchronization> filter)` and drop `from`, following 
`RecoverableAggregationRepository.confirmWithResult`. The design doc gets the 
same change. The commit is ready, and I'll push it once the core tests have run 
here.
   
   2. Yes, that is the intended trade-off. Camel calls the new method only when 
an `OnCompletionListener` is installed, which today means a sanitizer run in 
tests or CI. Production routes still go through the 2-arg method, so a subclass 
that overrides only that one behaves as before there. In a sanitizer run, the 
javadoc on `DefaultUnitOfWork` asks such a subclass to override the new method 
too. A custom `UnitOfWork` that is not a `DefaultUnitOfWork` gets the interface 
default, which calls its own 1-arg or 2-arg method, so nothing is bypassed 
there.
   
   _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