summaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-tosca-converter-lib
diff options
context:
space:
mode:
Diffstat (limited to 'openecomp-be/lib/openecomp-tosca-converter-lib')
-rw-r--r--openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/main/java/org/openecomp/core/impl/AbstractToscaConverter.java12
-rw-r--r--openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/test/java/org/openecomp/core/converter/impl/ToscaConvertorDefinitionsTest.java4
2 files changed, 8 insertions, 8 deletions
diff --git a/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/main/java/org/openecomp/core/impl/AbstractToscaConverter.java b/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/main/java/org/openecomp/core/impl/AbstractToscaConverter.java
index 859d3da9dc..0b0c6e42f9 100644
--- a/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/main/java/org/openecomp/core/impl/AbstractToscaConverter.java
+++ b/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/main/java/org/openecomp/core/impl/AbstractToscaConverter.java
@@ -46,6 +46,7 @@ import java.io.IOException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
+import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
@@ -180,12 +181,11 @@ public abstract class AbstractToscaConverter implements ToscaConverter {
}
private void convertImports(ServiceTemplate serviceTemplate) {
- serviceTemplate.setImports(new ArrayList<>());
- serviceTemplate.getImports()
- .add(createImportMap(openecompHeatIndex, HEAT_INDEX_IMPORT_FILE));
- serviceTemplate.getImports().add(createImportMap(ONAP_INDEX, ONAP_INDEX_IMPORT_FILE));
- serviceTemplate.getImports().add(createImportMap(globalSubstitution, globalStName));
-
+ List<Map<String, Import>> imports = new ArrayList<>();
+ imports.add(createImportMap(openecompHeatIndex, HEAT_INDEX_IMPORT_FILE));
+ imports.add(createImportMap(ONAP_INDEX, ONAP_INDEX_IMPORT_FILE));
+ imports.add(createImportMap(globalSubstitution, globalStName));
+ serviceTemplate.setImports(imports);
}
private Map<String, Import> createImportMap(String key, String fileName) {
diff --git a/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/test/java/org/openecomp/core/converter/impl/ToscaConvertorDefinitionsTest.java b/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/test/java/org/openecomp/core/converter/impl/ToscaConvertorDefinitionsTest.java
index d5a99106bc..2c3ff0ae5d 100644
--- a/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/test/java/org/openecomp/core/converter/impl/ToscaConvertorDefinitionsTest.java
+++ b/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/test/java/org/openecomp/core/converter/impl/ToscaConvertorDefinitionsTest.java
@@ -44,8 +44,8 @@ public class ToscaConvertorDefinitionsTest {
assertNotNull(serviceTemplate.getImports());
assertFalse(serviceTemplate.getImports().isEmpty());
assertEquals(1 ,serviceTemplate.getImports().size());
- assertTrue(serviceTemplate.getImports().get(0).containsKey(HEAT_INDEX));
- assertTrue(serviceTemplate.getImports().get(0).containsKey(ONAP_INDEX));
+ assertTrue(((Map) serviceTemplate.getImports().get(0)).containsKey(HEAT_INDEX));
+ assertTrue(((Map) serviceTemplate.getImports().get(0)).containsKey(ONAP_INDEX));
assertEquals(DEFININTION_VERSION, serviceTemplate.getTosca_definitions_version());