diff options
Diffstat (limited to 'sdc-tosca-parser')
-rw-r--r-- | sdc-tosca-parser/src/main/java/org/openecomp/sdc/tosca/parser/impl/SdcCsarHelperImpl.java | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/sdc-tosca-parser/src/main/java/org/openecomp/sdc/tosca/parser/impl/SdcCsarHelperImpl.java b/sdc-tosca-parser/src/main/java/org/openecomp/sdc/tosca/parser/impl/SdcCsarHelperImpl.java index 156b912..9ee3132 100644 --- a/sdc-tosca-parser/src/main/java/org/openecomp/sdc/tosca/parser/impl/SdcCsarHelperImpl.java +++ b/sdc-tosca-parser/src/main/java/org/openecomp/sdc/tosca/parser/impl/SdcCsarHelperImpl.java @@ -372,14 +372,18 @@ public class SdcCsarHelperImpl implements ISdcCsarHelper { public List<NodeTemplate> getAllottedResources() { List<NodeTemplate> nodeTemplates = null; nodeTemplates = toscaTemplate.getTopologyTemplate().getNodeTemplates(); - if(nodeTemplates==null || nodeTemplates.size()==0 ){ + if (nodeTemplates.isEmpty()) { log.error("getAllottedResources nodeTemplates not exist"); } - nodeTemplates = nodeTemplates.stream().filter(x -> x.getMetadata() != null && x.getMetadata().getValue("category").equals("Allotted Resources")).collect(Collectors.toList()); - if(nodeTemplates==null || nodeTemplates.size()==0 ){ + nodeTemplates = nodeTemplates.stream().filter( + x -> x.getMetadata() != null && x.getMetadata().getValue("category").equals("Allotted Resources")) + .collect(Collectors.toList()); + if (nodeTemplates.isEmpty()) { log.trace("getAllottedResources - allotted resources not exist"); - }else + } else { log.trace("getAllottedResources - the allotted resources list is {}", nodeTemplates); + } + return nodeTemplates; } @Override |