diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2022-08-12 21:15:56 +0200 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2022-08-12 21:15:56 +0200 |
commit | 43a7a44cc878fdc80b79b16ad7568b24d89c179c (patch) | |
tree | 0911ca5900969d0f0b2e08bd2c8491843a8dace4 /container-core | |
parent | 43830a7f7975080dbc4c25804a2506ab102c7868 (diff) |
Add some tests from an old branch and some code cleanup.
Diffstat (limited to 'container-core')
-rw-r--r-- | container-core/src/main/java/com/yahoo/component/chain/model/ChainSpecification.java | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/container-core/src/main/java/com/yahoo/component/chain/model/ChainSpecification.java b/container-core/src/main/java/com/yahoo/component/chain/model/ChainSpecification.java index a1c169dc387..f53b431265c 100644 --- a/container-core/src/main/java/com/yahoo/component/chain/model/ChainSpecification.java +++ b/container-core/src/main/java/com/yahoo/component/chain/model/ChainSpecification.java @@ -6,7 +6,15 @@ import com.yahoo.component.ComponentId; import com.yahoo.component.ComponentSpecification; import com.yahoo.component.chain.Phase; -import java.util.*; +import java.util.ArrayDeque; +import java.util.Collection; +import java.util.Collections; +import java.util.Deque; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.Map; +import java.util.Set; + /** * Specifies how the components should be selected to create a chain. Immutable. @@ -20,7 +28,7 @@ public class ChainSpecification { public final Set<ComponentSpecification> excludedComponents; Inheritance flattened() { - return new Inheritance(Collections.<ComponentSpecification>emptySet(), excludedComponents); + return new Inheritance(Set.of(), excludedComponents); } public Inheritance(Set<ComponentSpecification> inheritedChains, Set<ComponentSpecification> excludedComponents) { @@ -38,7 +46,7 @@ public class ChainSpecification { public final ComponentId componentId; public final Inheritance inheritance; - final Map<String, Phase> phases; + private final Map<String, Phase> phases; public final Set<ComponentSpecification> componentReferences; public ChainSpecification(ComponentId componentId, Inheritance inheritance, |