Skip to content

DelegatingCompletableFuture.cancel() returns false for already cancelled future [SPR-17337] #21871

Closed as not planned

Description

@spring-projects-issues

Ivan Sopov opened SPR-17337 and commented

Sorry - JIRA failed me many times in filling this issue (one time I retyped it from the beginning), so I filled it on Gist:
https://gist.github.com/isopov/b2dca9d7152f577741c8451d91e97e37
This is somewhat related to #21870


Affects: 5.1 GA

Issue Links:

Activity

  1. added
    type: bug
    status: waiting-for-triage
    in: core
    and removed
    type: bug
    on Jan 11, 2019
  2. bclozel commented on Sep 21, 2023

    @bclozel
    Member

    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.

  3. added
    status: declined
    and removed
    status: waiting-for-triage
    on Sep 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    in: corestatus: declined

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions