diff options
author | Martin Polden <mpolden@mpolden.no> | 2017-09-08 11:31:51 +0200 |
---|---|---|
committer | Martin Polden <mpolden@mpolden.no> | 2017-09-08 11:31:51 +0200 |
commit | bc50141e87b66e687fb2974e4ae16897bab283b0 (patch) | |
tree | 1960381615bd6047f40ae286bd6301e0cbda8c4e /config-model-api | |
parent | 9886b87286a16c8385e9642d6f864157cec9ce9d (diff) |
Fix deployment spec cast in container cluster model
Diffstat (limited to 'config-model-api')
-rw-r--r-- | config-model-api/src/main/java/com/yahoo/config/application/api/DeploymentSpec.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/config-model-api/src/main/java/com/yahoo/config/application/api/DeploymentSpec.java b/config-model-api/src/main/java/com/yahoo/config/application/api/DeploymentSpec.java index 8530679e82f..098f5620723 100644 --- a/config-model-api/src/main/java/com/yahoo/config/application/api/DeploymentSpec.java +++ b/config-model-api/src/main/java/com/yahoo/config/application/api/DeploymentSpec.java @@ -140,10 +140,11 @@ public class DeploymentSpec { /** Returns the deployment steps of this in the order they will be performed */ public List<Step> steps() { return steps; } - /** Returns only the DeclaredZone deployment steps of this in the order they will be performed */ + /** Returns all the DeclaredZone deployment steps in the order they are declared */ public List<DeclaredZone> zones() { - return steps.stream().filter(step -> step instanceof DeclaredZone).map(DeclaredZone.class::cast) - .collect(Collectors.toList()); + return steps.stream() + .flatMap(step -> step.zones().stream()) + .collect(Collectors.toList()); } /** Returns the XML form of this spec, or null if it was not created by fromXml, nor is empty */ |