diff options
Diffstat (limited to 'openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org')
-rw-r--r-- | openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/UnifiedCompositionService.java | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/UnifiedCompositionService.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/UnifiedCompositionService.java index c4aea2b6a4..57f3d7351b 100644 --- a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/UnifiedCompositionService.java +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/UnifiedCompositionService.java @@ -2819,19 +2819,17 @@ public class UnifiedCompositionService { UnifiedCompositionEntity inputUnifiedCompositionEntity = getInputCompositionEntity(substitutionTemplateInputName); - if (!inputType.equalsIgnoreCase(PropertyType.LIST.getDisplayName())) { - if (isIdenticalValueProperty( - substitutionTemplateInputName, inputUnifiedCompositionEntity)) { - //Handle identical value properties - Optional<String> identicalValuePropertyName = - getIdenticalValuePropertyName(substitutionTemplateInputName, - inputUnifiedCompositionEntity); - - identicalValuePropertyName.ifPresent(propertyName -> updateIdenticalPropertyValue(propertyName, - substitutionTemplateInputName, inputUnifiedCompositionEntity, - unifiedCompositionDataList.get(0), serviceTemplate, abstractSubstituteProperties, - context)); - } + if (isIdenticalValueProperty(substitutionTemplateInputName, inputUnifiedCompositionEntity) + || !inputType.equalsIgnoreCase(PropertyType.LIST.getDisplayName())) { + //Handle identical value properties + Optional<String> identicalValuePropertyName = + getIdenticalValuePropertyName(substitutionTemplateInputName, + inputUnifiedCompositionEntity); + + identicalValuePropertyName.ifPresent(propertyName -> updateIdenticalPropertyValue(propertyName, + substitutionTemplateInputName, inputUnifiedCompositionEntity, + unifiedCompositionDataList.get(0), serviceTemplate, abstractSubstituteProperties, + context)); continue; } @@ -3663,7 +3661,7 @@ public class UnifiedCompositionService { private Optional<String> getPortPropertyNameFromInput(String inputName, List<String> identicalValuePropertyList) { for (String identicalProperty : identicalValuePropertyList) { - if (inputName.contains(identicalProperty)) { + if (inputName.endsWith(identicalProperty)) { return Optional.of(identicalProperty); } } |