From e493a82391be3050227a96fc691ff11f36f49b41 Mon Sep 17 00:00:00 2001 From: sharath reddy Date: Mon, 4 Apr 2022 18:50:11 +0530 Subject: 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 Change-Id: I68295df76db1ed4015958fd1933fd5a6ac05dcd1 Signed-off-by: sharath reddy --- .../main/java/org/onap/cli/fw/schema/OnapCommandSchemaMerger.java | 5 +++-- 1 file 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 mergedResult, Map yamlContents) { if (yamlContents == null) return; - for (String key : yamlContents.keySet()) { + for (Map.Entry entry : yamlContents.entrySet()) { - Object yamlValue = yamlContents.get(key); + String key = entry.getKey(); + Object yamlValue = entry.getValue(); if (yamlValue == null) { mergedResult.put(key, yamlValue); continue; -- cgit 1.2.3-korg