From 0da3e7d52c83b54b126dd52f23da3bb94e152fba Mon Sep 17 00:00:00 2001 From: Satoshi Fujii Date: Fri, 26 Apr 2019 20:00:07 +0900 Subject: Fixed properties merge logic not to lose properties from inputs Change-Id: I9dbc244c667272062bc4de90d616ea1c5458ed0a Issue-ID: SDC-2255 Signed-off-by: Satoshi Fujii --- .../src/main/java/org/openecomp/sdc/be/tosca/ToscaExportHandler.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'catalog-be/src/main/java') diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/tosca/ToscaExportHandler.java b/catalog-be/src/main/java/org/openecomp/sdc/be/tosca/ToscaExportHandler.java index 65451e9dc5..127d6f67af 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/tosca/ToscaExportHandler.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/tosca/ToscaExportHandler.java @@ -551,10 +551,13 @@ public class ToscaExportHandler { if(CollectionUtils.isNotEmpty(component.getProperties())) { List properties = component.getProperties(); - mergedProperties = properties.stream().collect(Collectors.toMap( + Map convertedProperties; + convertedProperties = properties.stream().collect(Collectors.toMap( PropertyDataDefinition::getName, property -> propertyConvertor.convertProperty(dataTypes, property, PropertyConvertor.PropertyType.PROPERTY))); + // merge component properties and inputs properties + mergedProperties.putAll(convertedProperties); } if (MapUtils.isNotEmpty(mergedProperties) && Objects.nonNull(inputDef)) { resolveDefaultPropertyValue(inputDef, mergedProperties, dataTypes); -- cgit 1.2.3-korg