From ae8fe8b1deb89995ff844f7019c3e570e9c8c948 Mon Sep 17 00:00:00 2001 From: MichaelMorris Date: Fri, 9 Apr 2021 12:26:22 +0100 Subject: Fix default imports being amended Signed-off-by: MichaelMorris Issue-ID: SDC-3552 Change-Id: Ibb5cfbba2075820c798eae1726953871140ddce5 --- .../src/main/java/org/openecomp/sdc/be/tosca/ToscaExportHandler.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'catalog-be') 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 exportComponentInterface(final Component component, final boolean isAssociatedComponent) { - final List>> imports = getDefaultToscaImportConfig(); + final List>> 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 nodeTypes = new HashMap<>(); final Either toscaTemplateRes = convertInterfaceNodeType(new HashMap<>(), component, toscaTemplate, nodeTypes, isAssociatedComponent); -- cgit 1.2.3-korg