From 56e6373970b8c3ded54d6261fb72d7ddf55ad1d9 Mon Sep 17 00:00:00 2001 From: eleonorali Date: Tue, 7 Aug 2018 16:36:28 +0300 Subject: TOSCA Consolidation Data - Refactoring Part 4 Some additional minor changes 2 Change-Id: Ie8ab6bdd9e396904a2ba2eea3c6b03f0a0ed466b Issue-ID: SDC-1330 Signed-off-by: eleonorali --- .../sdc/translator/services/heattotosca/HeatToToscaUtil.java | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'openecomp-be/lib') diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/HeatToToscaUtil.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/HeatToToscaUtil.java index 4054537eb2..9c21c9cbf6 100644 --- a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/HeatToToscaUtil.java +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/HeatToToscaUtil.java @@ -666,14 +666,8 @@ public class HeatToToscaUtil { HeatOrchestrationTemplate nestedHeatOrchestrationTemplate = new YamlUtil().yamlToObject( context.getFileContent(nestedHeatFileName.get()), HeatOrchestrationTemplate.class); Map resources = nestedHeatOrchestrationTemplate.getResources(); - if (Objects.nonNull(resources)) { - for (Resource innerResource : resources.values()) { - if (ConsolidationDataUtil.isComputeResource(innerResource)) { - return true; - } - } - } - return false; + return Objects.nonNull(resources) && resources.values().stream() + .anyMatch(ConsolidationDataUtil::isComputeResource); } /** -- cgit 1.2.3-korg