aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKanagaraj Manickam <kanagaraj.manickam@huawei.com>2022-04-07 12:26:20 +0000
committerGerrit Code Review <gerrit@onap.org>2022-04-07 12:26:20 +0000
commit0df43adfbd30158aa992c08ca0fbe55a6d277dec (patch)
tree1508e69d81ddf7c876cdff5405472f8c403a6bfa
parent70222a00b2d4347a25ea39b47dd6c9b9f8d78fa8 (diff)
parente493a82391be3050227a96fc691ff11f36f49b41 (diff)
Merge "Updated loop to iterate over the "entrySet" instead of the "keySet"."
-rw-r--r--framework/src/main/java/org/onap/cli/fw/schema/OnapCommandSchemaMerger.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/framework/src/main/java/org/onap/cli/fw/schema/OnapCommandSchemaMerger.java b/framework/src/main/java/org/onap/cli/fw/schema/OnapCommandSchemaMerger.java
index 7e0d40ee..d8f29800 100644
--- a/framework/src/main/java/org/onap/cli/fw/schema/OnapCommandSchemaMerger.java
+++ b/framework/src/main/java/org/onap/cli/fw/schema/OnapCommandSchemaMerger.java
@@ -77,9 +77,10 @@ public class OnapCommandSchemaMerger {
public static void mergeYamlMap(Map<String, Object> mergedResult, Map<String, Object> yamlContents) {
if (yamlContents == null) return;
- for (String key : yamlContents.keySet()) {
+ for (Map.Entry<String,Object> entry : yamlContents.entrySet()) {
- Object yamlValue = yamlContents.get(key);
+ String key = entry.getKey();
+ Object yamlValue = entry.getValue();
if (yamlValue == null) {
mergedResult.put(key, yamlValue);
continue;