From 43187c8495b88589f3187e110cf8d592a091c37f Mon Sep 17 00:00:00 2001 From: shiria Date: Mon, 19 Mar 2018 15:23:23 +0200 Subject: Update FlatEntity in TOSCA Add support of dataType entity flat hierarchy in TOSCA Fix existing nodeType entity flat hierarchy in TOSCA Change-Id: I52cd188c595a263c70c2067fd1aac9752f7e24a4 Issue-ID: SDC-1147 Signed-off-by: shiria --- .../org/openecomp/core/utilities/CommonMethods.java | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'openecomp-be/lib/openecomp-core-lib') diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/src/main/java/org/openecomp/core/utilities/CommonMethods.java b/openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/src/main/java/org/openecomp/core/utilities/CommonMethods.java index 7f207c59a9..cc924419f8 100644 --- a/openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/src/main/java/org/openecomp/core/utilities/CommonMethods.java +++ b/openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/src/main/java/org/openecomp/core/utilities/CommonMethods.java @@ -1,5 +1,5 @@ /* - * Copyright © 2016-2017 European Support Limited + * Copyright © 2016-2018 European Support Limited * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -347,17 +347,18 @@ public class CommonMethods { * * @param the type parameter * @param the type parameter - * @param target the target - * @param source the source + * @param firstMap the firstMap + * @param secondMap the secondMap * @return the map + * Second Map is overridden data from the first map */ - public static Map mergeMaps(Map target, Map source) { + public static Map mergeMaps(Map firstMap, Map secondMap) { Map retMap = new HashMap<>(); - if (MapUtils.isNotEmpty(source)) { - retMap.putAll(source); + if (MapUtils.isNotEmpty(firstMap)) { + retMap.putAll(firstMap); } - if (MapUtils.isNotEmpty(target)) { - retMap.putAll(target); + if (MapUtils.isNotEmpty(secondMap)) { + retMap.putAll(secondMap); } return retMap; } -- cgit 1.2.3-korg