From 30670accb070b20c1c770d1ebbd6d72e24fee2db Mon Sep 17 00:00:00 2001 From: sebdet Date: Tue, 4 Aug 2020 14:16:00 +0200 Subject: Upgrade to java 11 MOve SDC to Java 11, this is one of the PR to move to Jdk 11, jenkins will have to be changed as well Issue-ID: SDC-2725 Change-Id: I85f13f14ba8004f6e9656093a837465a2e4af3e1 Signed-off-by: sebdet Signed-off-by: xuegao Signed-off-by: sebdet --- .../main/java/org/openecomp/sdc/tosca/services/DataModelUtil.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'openecomp-be/lib/openecomp-tosca-lib/src/main/java/org') 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 requirement = new HashMap<>(); requirement.put(requirementId, requirementAssignment); - nodeTemplate.getRequirements().add(requirement); + nodeTemplate.addRequirements(requirement); } /** -- cgit 1.2.3-korg