Skip to content

Fix SmartLifecycle.stop(Runnable) usage #2973

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

artembilan
Copy link
Member

We always have to call callback in the SmartLifecycle.stop(Runnable)
implementation independently of component state

  • Fix StandardIntegrationFlow.stop(Runnable) for a logic when we
    don't have any this.lifecycles
  • Remove those stop(Runnable) which are fully equivalent of the
    default on in the SmartLifecycle
  • Some other simple polishing for the affected classes, e.g.
    isSingleton() is default with true in the InitializingBean

Cherry-pick to 5.1.x

@garyrussell
Copy link
Contributor

Travis (CheckStyle)

We always have to call `callback` in the `SmartLifecycle.stop(Runnable)`
implementation independently of component state
* Fix `StandardIntegrationFlow.stop(Runnable)` for a logic when we
don't have any `this.lifecycles`
* Remove those `stop(Runnable)` which are fully equivalent of the
`default` on in the `SmartLifecycle`
* Some other simple polishing for the affected classes, e.g.
`isSingleton()` is `default` with `true` in the `InitializingBean`

**Cherry-pick to 5.1.x**
@artembilan artembilan force-pushed the Lifecycle_stop_polishing branch from 4949518 to 6b009bd Compare June 21, 2019 20:23
@garyrussell garyrussell merged commit bda5221 into spring-projects:master Jun 21, 2019
garyrussell pushed a commit that referenced this pull request Jun 21, 2019
* Fix `SmartLifecycle.stop(Runnable)` usage

We always have to call `callback` in the `SmartLifecycle.stop(Runnable)`
implementation independently of component state
* Fix `StandardIntegrationFlow.stop(Runnable)` for a logic when we
don't have any `this.lifecycles`
* Remove those `stop(Runnable)` which are fully equivalent of the
`default` on in the `SmartLifecycle`
* Some other simple polishing for the affected classes, e.g.
`isSingleton()` is `default` with `true` in the `InitializingBean`

**Cherry-pick to 5.1.x**

* * Fix checkstyle violation
@garyrussell
Copy link
Contributor

Cherry-picked as eea5089 after resolving conflicts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants