summaryrefslogtreecommitdiffstats
path: root/catalog-be/src/main/java/org
diff options
context:
space:
mode:
authorfranciscovila <javier.paradela.vila@est.tech>2022-08-11 11:33:01 +0100
committerMichael Morris <michael.morris@est.tech>2022-08-11 12:23:06 +0000
commit33538725267c361efe813f1a4e6eff8b69c09c9f (patch)
tree67413a8f483a26b8e7d7562b9a4e278b2694d883 /catalog-be/src/main/java/org
parent0f6ae59460165381a8b5da2eea58c2c2efa75f2f (diff)
Error Importing node filter with multiple capability properties
Fix importing NF with multiple Capability properties Issue-ID: SDC-4117 Signed-off-by: franciscovila <javier.paradela.vila@est.tech> Change-Id: I84fc245ddb40440d4909f5ae896b57ddf8b3740a
Diffstat (limited to 'catalog-be/src/main/java/org')
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/tosca/utils/NodeFilterConverter.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/tosca/utils/NodeFilterConverter.java b/catalog-be/src/main/java/org/openecomp/sdc/be/tosca/utils/NodeFilterConverter.java
index 63093ebd9a..48932fefd7 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/tosca/utils/NodeFilterConverter.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/tosca/utils/NodeFilterConverter.java
@@ -59,10 +59,12 @@ public class NodeFilterConverter {
private void convertCapabilityConstraint(final RequirementNodeFilterCapabilityDataDefinition requirementNodeFilterCapabilityDataDefinition,
final List<UIConstraint> capabilitiesConstraint) {
- final UIConstraint uiConstraint = new UIConstraint();
final ConstraintConvertor constraintConvertor = new ConstraintConvertor();
- uiConstraint.setCapabilityName(requirementNodeFilterCapabilityDataDefinition.getName());
- requirementNodeFilterCapabilityDataDefinition.getProperties().getListToscaDataDefinition().forEach(
- property -> capabilitiesConstraint.add(constraintConvertor.getUiConstraint(property.getConstraints().iterator().next(), uiConstraint)));
+ requirementNodeFilterCapabilityDataDefinition.getProperties().getListToscaDataDefinition().forEach(property -> {
+ final UIConstraint uiConstraint = new UIConstraint();
+ uiConstraint.setCapabilityName(requirementNodeFilterCapabilityDataDefinition.getName());
+ capabilitiesConstraint.add(
+ constraintConvertor.getUiConstraint(property.getConstraints().iterator().next(), uiConstraint));
+ });
}
}