diff options
author | JvD_Ericsson <jeff.van.dam@est.tech> | 2023-09-06 15:12:44 +0100 |
---|---|---|
committer | Vasyl Razinkov <vasyl.razinkov@est.tech> | 2023-09-08 14:17:15 +0000 |
commit | cec4c5b5fac4fc0567535fa7254aae29160b2a0a (patch) | |
tree | a727e49e25028fe4759aeb0d5c36db58aaaf857c /catalog-be/src | |
parent | ec5c8fddfb0ba0e40b19cd438533114652448d0f (diff) |
Fix error when importing output with common attribute and property name
Issue-ID: SDC-4618
Signed-off-by: JvD_Ericsson <jeff.van.dam@est.tech>
Change-Id: Ib0736fceded328387d696abc7091e4b1672313e1
Diffstat (limited to 'catalog-be/src')
-rw-r--r-- | catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/OutputsBusinessLogic.java | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/OutputsBusinessLogic.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/OutputsBusinessLogic.java index 1f1f776245..ecab6402c6 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/OutputsBusinessLogic.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/OutputsBusinessLogic.java @@ -320,7 +320,6 @@ public class OutputsBusinessLogic extends BaseBusinessLogic { final String attributeName, final ComponentInstance componentInstance) { // From Instance - final List<OutputDefinition> result = new ArrayList<>(); final var componentInstanceAttributes = componentInstance.getAttributes(); if (CollectionUtils.isNotEmpty(componentInstanceAttributes)) { final var componentInstanceAttributeOptional = componentInstanceAttributes.stream() @@ -329,12 +328,8 @@ public class OutputsBusinessLogic extends BaseBusinessLogic { final var componentInstOutputsMap = new ComponentInstOutputsMap(); componentInstOutputsMap.setComponentInstanceAttributes(Collections.singletonMap(componentInstance.getUniqueId(), Collections.singletonList(new ComponentInstanceAttribOutput(componentInstanceAttributeOptional.get())))); - final var createdOutputs = createMultipleOutputs(userId, componentUniqueId, ComponentTypeEnum.SERVICE, + return createMultipleOutputs(userId, componentUniqueId, ComponentTypeEnum.SERVICE, componentInstOutputsMap, true, false); - if (createdOutputs.isRight()) { - return Either.right((createdOutputs.right().value())); - } - result.addAll(createdOutputs.left().value()); } } final List<PropertyDefinition> componentInstanceProperties = componentInstance.getProperties(); @@ -350,7 +345,7 @@ public class OutputsBusinessLogic extends BaseBusinessLogic { return createMultipleOutputs(userId, componentUniqueId, ComponentTypeEnum.SERVICE, componentInstOutputsMap, true, false); } } - return Either.left(result); + return Either.left(new ArrayList<>()); } @NotNull |