Fix SmartLifecycle.stop(Runnable) usage (#2973)

* 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
This commit is contained in:
Artem Bilan
2019-06-21 16:50:38 -04:00
committed by Gary Russell
parent a75f0808fd
commit bda5221720
13 changed files with 79 additions and 152 deletions

View File

@@ -306,16 +306,6 @@ public abstract class AbstractStompSessionManager implements StompSessionManager
}
}
@Override
public void stop(Runnable callback) {
synchronized (this.lifecycleMonitor) {
stop();
if (callback != null) {
callback.run();
}
}
}
@Override
public void stop() {
synchronized (this.lifecycleMonitor) {