aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-tosca-lib/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'openecomp-be/lib/openecomp-tosca-lib/src/main/java')
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/DataModelUtil.java5
1 files changed, 1 insertions, 4 deletions
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/DataModelUtil.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/DataModelUtil.java
index 70cae71f17..f7188379dc 100644
--- a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/DataModelUtil.java
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/DataModelUtil.java
@@ -373,12 +373,9 @@ public class DataModelUtil {
throw new CoreException(new InvalidRequirementAssignmentErrorBuilder(requirementId).build());
}
- if (nodeTemplate.getRequirements() == null) {
- nodeTemplate.setRequirements(new ArrayList<>());
- }
Map<String, RequirementAssignment> requirement = new HashMap<>();
requirement.put(requirementId, requirementAssignment);
- nodeTemplate.getRequirements().add(requirement);
+ nodeTemplate.addRequirements(requirement);
}
/**