When submitting the service CSAR file import, duplicate key null appears in the log 58/114958/2
authorzhaoxiangjun666 <xjzhaop@isoftstone.com>
Tue, 17 Nov 2020 03:11:32 +0000 (11:11 +0800)
committerChristophe Closset <christophe.closset@intl.att.com>
Tue, 17 Nov 2020 13:18:00 +0000 (13:18 +0000)
Issue-ID: SDC-3382
Change-Id: I7679cd7677f9e9bb6e7c8efd8f081fba4972d1bd
Signed-off-by: zhaoxiangjun666 <xjzhaop@isoftstone.com>
catalog-model/src/main/java/org/openecomp/sdc/be/model/jsonjanusgraph/utils/ModelConverter.java

index 4d2480f..0d9e6a0 100644 (file)
@@ -1874,7 +1874,7 @@ public class ModelConverter {
                 attributesMap = new MapAttributesDataDefinition();
 
                 attributesMap.setMapToscaDataDefinition(entry.getValue().stream().map(AttributeDefinition::new)
-                    .collect(Collectors.toMap(AttributeDataDefinition::getName, Function.identity())));
+                    .collect(Collectors.toMap(AttributeDataDefinition::getName, Function.identity(),(entity1,entity2) -> entity1)));
 
                 topologyTemplate.getInstAttributes().put(entry.getKey(), attributesMap);
             }