From 88237269b79d18a03e639377487b6df1b8a4b2fb Mon Sep 17 00:00:00 2001 From: Kanagaraj Manickam k00365106 Date: Wed, 9 May 2018 11:47:41 +0000 Subject: Improve param cache with entrySet Issue-ID: CLI-100 Change-Id: I12e68fee18f9affdbda414bf411e08c06fe7e724 Signed-off-by: Kanagaraj Manickam k00365106 --- .../org/onap/cli/fw/input/cache/OnapCommandParameterCache.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/framework/src/main/java/org/onap/cli/fw/input/cache/OnapCommandParameterCache.java b/framework/src/main/java/org/onap/cli/fw/input/cache/OnapCommandParameterCache.java index 72902ad3..ade5c998 100644 --- a/framework/src/main/java/org/onap/cli/fw/input/cache/OnapCommandParameterCache.java +++ b/framework/src/main/java/org/onap/cli/fw/input/cache/OnapCommandParameterCache.java @@ -98,13 +98,13 @@ public class OnapCommandParameterCache { private void persist() { List params = new ArrayList<>(); - for (String p: this.paramCache.keySet()) { - for (String name: this.paramCache.get(p).keySet()) { + for (Map.Entry> p: this.paramCache.entrySet()) { + for (Map.Entry paramEntry: p.getValue().entrySet()) { OnapCommandParamEntity param = new OnapCommandParamEntity(); - param.setProduct(p); - param.setName(name); - param.setValue(this.paramCache.get(p).get(name)); + param.setProduct(p.getKey()); + param.setName(paramEntry.getKey()); + param.setValue(paramEntry.getValue()); params.add(param); } -- cgit 1.2.3-korg