summaryrefslogtreecommitdiffstats
path: root/models-tosca/src/main/java
diff options
context:
space:
mode:
authorPamela Dragosh <pdragosh@research.att.com>2019-06-18 12:20:57 +0000
committerGerrit Code Review <gerrit@onap.org>2019-06-18 12:20:57 +0000
commit92bd3a4d89a3f7740094e0c5dac278722fc3f27c (patch)
treefc202de200edef303bd66841245e189e469916fb /models-tosca/src/main/java
parent348050eb3635e061deb4c21581a274299d7c6e12 (diff)
parent1d59343e1c0b2077137a16f83bd0da21cdc2741f (diff)
Merge "Fix the bug of cannot return multiple versions of particular tosca policy and policy type"
Diffstat (limited to 'models-tosca/src/main/java')
-rw-r--r--models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/provider/AuthorativeToscaProvider.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/provider/AuthorativeToscaProvider.java b/models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/provider/AuthorativeToscaProvider.java
index 0fae304c3..cd73ae599 100644
--- a/models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/provider/AuthorativeToscaProvider.java
+++ b/models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/provider/AuthorativeToscaProvider.java
@@ -368,15 +368,17 @@ public class AuthorativeToscaProvider {
/**
* Return the contents of a list of concepts as a list of maps of concepts.
*
- * @param comceptList the concept list
- * @return the concept map
+ * @param conceptList the concept list
+ * @return the list of concept map
*/
private <T extends ToscaEntity> List<Map<String, T>> asConceptMap(List<T> conceptList) {
- Map<String, T> conceptMap = new LinkedHashMap<>();
+ List<Map<String, T>> toscaEntityMapList = new ArrayList<>();
for (T concept : conceptList) {
+ Map<String, T> conceptMap = new LinkedHashMap<>();
conceptMap.put(concept.getName(), concept);
+ toscaEntityMapList.add(conceptMap);
}
- return Collections.singletonList(conceptMap);
+ return toscaEntityMapList;
}
}