-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
INT-4438: No lifecycle twice in the same role
JIRA: https://jira.spring.io/browse/INT-4438 The `SmartLifecycleRoleController` is based on the `MultiValueMap` which used internally a `List` for the values. With such an architecture we can add the same value several times. On the other hand we are iterating over `Lifecycle`s in the role and build a `Map` for their running status. In this case when `NamesComponent`s return the same name the Java `Collectors.toMap()` fails with a duplicate key error. In any cases it would be better do not allow to add the same lifecylce several time to the role or different with the same name. * Add search logic to the `addLifecycleToRole()` to fail fast with the `IllegalArgumentException` because a lifecycle with the same name is already present in the role **Cherry-pick to 5.0.x** * Remove redundant `this.initialized = false` from the `AbstractPollingEndpoint.doStop()` Add `allEndpointsRunning()` verification to the `EndpointRoleParserTests` Polishing
- Loading branch information
1 parent
9ce329f
commit 29b60c2
Showing
4 changed files
with
104 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters