diff options
author | eleonorali <eleonoral@amdocs.com> | 2018-08-07 16:36:28 +0300 |
---|---|---|
committer | Vitaly Emporopulo <Vitaliy.Emporopulo@amdocs.com> | 2018-08-12 07:57:29 +0000 |
commit | 56e6373970b8c3ded54d6261fb72d7ddf55ad1d9 (patch) | |
tree | da68755110687a807e601f688ad152b15a211c59 /openecomp-be | |
parent | aa7e0f9134195fe89bb96b3971d7821df217ff32 (diff) |
TOSCA Consolidation Data - Refactoring Part 4
Some additional minor changes 2
Change-Id: Ie8ab6bdd9e396904a2ba2eea3c6b03f0a0ed466b
Issue-ID: SDC-1330
Signed-off-by: eleonorali <eleonoral@amdocs.com>
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.java | 10 |
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); } /** |