You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
DelegatingCompletableFuture.cancel() returns false for already cancelled future [SPR-17337] #21871
in: coreIssues in core modules (aop, beans, core, context, expression)status: declinedA suggestion or change that we don't feel we should currently apply
Thanks for raising this issue Ivan, and sorry it took us so long to reply.
I agree that this subtle difference is quite tricky. The JavaDoc of Future does say that Implementations may provide stronger guarantees, but here it's really a behavior change. Our delegation implementation... delegates and the cancel() behavior isn't well defined.
Anyway ListenableFuture has been deprecated as of 6.0 in the meantime, so I don't think we should change the behavior now right before retiring it completely.
in: coreIssues in core modules (aop, beans, core, context, expression)status: declinedA suggestion or change that we don't feel we should currently apply
Activity
bclozel commentedon Sep 21, 2023
Thanks for raising this issue Ivan, and sorry it took us so long to reply.
I agree that this subtle difference is quite tricky. The JavaDoc of
Futuredoes say thatImplementations may provide stronger guarantees, but here it's really a behavior change. Our delegation implementation... delegates and thecancel()behavior isn't well defined.Anyway
ListenableFuturehas been deprecated as of 6.0 in the meantime, so I don't think we should change the behavior now right before retiring it completely.