diff options
author | sharath reddy <bs.reddy@huawei.com> | 2022-04-04 18:50:11 +0530 |
---|---|---|
committer | sharath reddy <bs.reddy@huawei.com> | 2022-04-04 18:56:12 +0530 |
commit | e493a82391be3050227a96fc691ff11f36f49b41 (patch) | |
tree | 82a7132357932d371dbf47a28d1218ad07d4dec3 | |
parent | 19a75142348a233c027d7a2e7e87721ed3500cc3 (diff) |
Updated loop to iterate over the "entrySet" instead of the "keySet".
Issue-ID: CLI-439
report: tested weather-report, execution-list
Signed-off-by: sharath reddy <bs.reddy@huawei.com>
Change-Id: I68295df76db1ed4015958fd1933fd5a6ac05dcd1
Signed-off-by: sharath reddy <bs.reddy@huawei.com>
-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; |