diff options
author | Kanagaraj Manickam <kanagaraj.manickam@huawei.com> | 2022-04-07 12:26:20 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2022-04-07 12:26:20 +0000 |
commit | 0df43adfbd30158aa992c08ca0fbe55a6d277dec (patch) | |
tree | 1508e69d81ddf7c876cdff5405472f8c403a6bfa /framework/src/main | |
parent | 70222a00b2d4347a25ea39b47dd6c9b9f8d78fa8 (diff) | |
parent | e493a82391be3050227a96fc691ff11f36f49b41 (diff) |
Merge "Updated loop to iterate over the "entrySet" instead of the "keySet"."
Diffstat (limited to 'framework/src/main')
-rw-r--r-- | framework/src/main/java/org/onap/cli/fw/schema/OnapCommandSchemaMerger.java | 5 |
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; |