aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-be
diff options
context:
space:
mode:
Diffstat (limited to 'openecomp-be')
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/HeatToToscaUtil.java10
1 files changed, 2 insertions, 8 deletions
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<String, Resource> 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);
}
/**