diff options
author | 2019-04-26 20:00:07 +0900 | |
---|---|---|
committer | 2019-05-08 14:52:59 +0000 | |
commit | 0da3e7d52c83b54b126dd52f23da3bb94e152fba (patch) | |
tree | 109c0dfc595e979576fcab5ec3c38d852cc3a54d /catalog-be/src/main/java/org/openecomp | |
parent | faaad99b7304d2d0901c282e7597acc453a77655 (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/java/org/openecomp')
-rw-r--r-- | catalog-be/src/main/java/org/openecomp/sdc/be/tosca/ToscaExportHandler.java | 5 |
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); |