diff options
author | MichaelMorris <michael.morris@est.tech> | 2021-04-09 12:26:22 +0100 |
---|---|---|
committer | Christophe Closset <christophe.closset@intl.att.com> | 2021-04-12 08:38:40 +0000 |
commit | ae8fe8b1deb89995ff844f7019c3e570e9c8c948 (patch) | |
tree | 671664d5d462e428ee012dedcd5da7134e280c9c /catalog-be/src/main/java/org | |
parent | 45e2f0ae4c14ee24e696717c9d150a2ff0bdc872 (diff) |
Fix default imports being amended
Signed-off-by: MichaelMorris <michael.morris@est.tech>
Issue-ID: SDC-3552
Change-Id: Ibb5cfbba2075820c798eae1726953871140ddce5
Diffstat (limited to 'catalog-be/src/main/java/org')
-rw-r--r-- | catalog-be/src/main/java/org/openecomp/sdc/be/tosca/ToscaExportHandler.java | 4 |
1 files changed, 2 insertions, 2 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 10d2130792..d211a8bb76 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 @@ -200,7 +200,7 @@ public class ToscaExportHandler { } public Either<ToscaRepresentation, ToscaError> exportComponentInterface(final Component component, final boolean isAssociatedComponent) { - final List<Map<String, Map<String, String>>> imports = getDefaultToscaImportConfig(); + final List<Map<String, Map<String, String>>> imports = new ArrayList<>(getDefaultToscaImportConfig()); if (CollectionUtils.isEmpty(imports)) { log.debug(FAILED_TO_GET_DEFAULT_IMPORTS_CONFIGURATION); return Either.right(ToscaError.GENERAL_ERROR); @@ -220,7 +220,7 @@ public class ToscaExportHandler { toscaVersion = ((Resource) component).getToscaVersion(); } ToscaTemplate toscaTemplate = new ToscaTemplate(toscaVersion != null ? toscaVersion : TOSCA_VERSION); - toscaTemplate.setImports(new ArrayList<>(imports)); + toscaTemplate.setImports(imports); final Map<String, ToscaNodeType> nodeTypes = new HashMap<>(); final Either<ToscaTemplate, ToscaError> toscaTemplateRes = convertInterfaceNodeType(new HashMap<>(), component, toscaTemplate, nodeTypes, isAssociatedComponent); |