diff options
author | Harald Musum <musum@verizonmedia.com> | 2022-12-05 10:06:35 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-05 10:06:35 +0100 |
commit | f586fb9146b8176ba451778c025c4edb3905695e (patch) | |
tree | b616d197818ab13527d66952266e2dc0d81cc5fb /config-model-api/src/main/java/com/yahoo/config/application/api/xml/DeploymentSpecXmlReader.java | |
parent | 608390a4472f4d3e77aa7177b4635399f8b1ce63 (diff) | |
parent | 96b3f89ad27efd4c2306ca4e8b4bc07c4f0b2949 (diff) |
Merge pull request #25104 from vespa-engine/revert-25103-balder/manual-revert-of-25097
Revert "Revert collect(Collectors.toList())"
Diffstat (limited to 'config-model-api/src/main/java/com/yahoo/config/application/api/xml/DeploymentSpecXmlReader.java')
-rw-r--r-- | config-model-api/src/main/java/com/yahoo/config/application/api/xml/DeploymentSpecXmlReader.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/config-model-api/src/main/java/com/yahoo/config/application/api/xml/DeploymentSpecXmlReader.java b/config-model-api/src/main/java/com/yahoo/config/application/api/xml/DeploymentSpecXmlReader.java index c1ecddee456..8182e697e7e 100644 --- a/config-model-api/src/main/java/com/yahoo/config/application/api/xml/DeploymentSpecXmlReader.java +++ b/config-model-api/src/main/java/com/yahoo/config/application/api/xml/DeploymentSpecXmlReader.java @@ -215,7 +215,7 @@ public class DeploymentSpecXmlReader { notifications, endpoints, now)) - .collect(Collectors.toList()); + .toList(); } private List<Step> readSteps(Element stepTag, Map<String, String> prodAttributes, Element parentTag) { @@ -250,7 +250,7 @@ public class DeploymentSpecXmlReader { case prodTag: // regions, delay and parallel may be nested within, but we can flatten them return XML.getChildren(stepTag).stream() .flatMap(child -> readNonInstanceSteps(child, prodAttributes, stepTag).stream()) - .collect(Collectors.toList()); + .toList(); case delayTag: return List.of(new Delay(Duration.ofSeconds(longAttribute("hours", stepTag) * 60 * 60 + longAttribute("minutes", stepTag) * 60 + @@ -258,11 +258,11 @@ public class DeploymentSpecXmlReader { case parallelTag: // regions and instances may be nested within return List.of(new ParallelSteps(XML.getChildren(stepTag).stream() .flatMap(child -> readSteps(child, prodAttributes, parentTag).stream()) - .collect(Collectors.toList()))); + .toList())); case stepsTag: // regions and instances may be nested within return List.of(new Steps(XML.getChildren(stepTag).stream() .flatMap(child -> readSteps(child, prodAttributes, parentTag).stream()) - .collect(Collectors.toList()))); + .toList())); case regionTag: return List.of(readDeclaredZone(Environment.prod, athenzService, testerFlavor, stepTag)); default: @@ -378,7 +378,7 @@ public class DeploymentSpecXmlReader { * Imposes some constraints on tag order which are not expressible in the schema */ private void validateTagOrder(Element root) { - List<String> tags = XML.getChildren(root).stream().map(Element::getTagName).collect(Collectors.toList()); + List<String> tags = XML.getChildren(root).stream().map(Element::getTagName).toList(); for (int i = 0; i < tags.size(); i++) { if (tags.get(i).equals(blockChangeTag)) { String constraint = "<block-change> must be placed after <test> and <staging> and before <prod>"; |