summaryrefslogtreecommitdiffstats
path: root/framework/src/main/java/org
diff options
context:
space:
mode:
authorKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>2018-05-09 11:47:41 +0000
committerKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>2018-05-09 11:47:41 +0000
commit88237269b79d18a03e639377487b6df1b8a4b2fb (patch)
treec3bf48e124409cc275c44184aebfd9b984977da5 /framework/src/main/java/org
parent1771f21be73fad02ad9e5736ee8d6412cb824950 (diff)
Improve param cache with entrySet
Issue-ID: CLI-100 Change-Id: I12e68fee18f9affdbda414bf411e08c06fe7e724 Signed-off-by: Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>
Diffstat (limited to 'framework/src/main/java/org')
-rw-r--r--framework/src/main/java/org/onap/cli/fw/input/cache/OnapCommandParameterCache.java10
1 files 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<OnapCommandParamEntity> params = new ArrayList<>();
- for (String p: this.paramCache.keySet()) {
- for (String name: this.paramCache.get(p).keySet()) {
+ for (Map.Entry<String, Map<String, String>> p: this.paramCache.entrySet()) {
+ for (Map.Entry<String, String> 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);
}