summaryrefslogtreecommitdiffstats
path: root/config-model-api/src
diff options
context:
space:
mode:
authorMartin Polden <mpolden@mpolden.no>2017-09-08 11:31:51 +0200
committerMartin Polden <mpolden@mpolden.no>2017-09-08 11:31:51 +0200
commitbc50141e87b66e687fb2974e4ae16897bab283b0 (patch)
tree1960381615bd6047f40ae286bd6301e0cbda8c4e /config-model-api/src
parent9886b87286a16c8385e9642d6f864157cec9ce9d (diff)
Fix deployment spec cast in container cluster model
Diffstat (limited to 'config-model-api/src')
-rw-r--r--config-model-api/src/main/java/com/yahoo/config/application/api/DeploymentSpec.java7
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 */