summaryrefslogtreecommitdiffstats
path: root/catalog-be/src/main
diff options
context:
space:
mode:
authorSatoshi Fujii <fujii-satoshi@jp.fujitsu.com>2019-04-26 20:00:07 +0900
committerOfir Sonsino <ofir.sonsino@intl.att.com>2019-05-08 14:52:59 +0000
commit0da3e7d52c83b54b126dd52f23da3bb94e152fba (patch)
tree109c0dfc595e979576fcab5ec3c38d852cc3a54d /catalog-be/src/main
parentfaaad99b7304d2d0901c282e7597acc453a77655 (diff)
Fixed properties merge logic not to lose properties from inputs
Change-Id: I9dbc244c667272062bc4de90d616ea1c5458ed0a Issue-ID: SDC-2255 Signed-off-by: Satoshi Fujii <fujii-satoshi@jp.fujitsu.com>
Diffstat (limited to 'catalog-be/src/main')
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/tosca/ToscaExportHandler.java5
1 files changed, 4 insertions, 1 deletions
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<PropertyDefinition> properties = component.getProperties();
- mergedProperties = properties.stream().collect(Collectors.toMap(
+ Map<String, ToscaProperty> 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);