aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>2018-05-02 16:11:22 +0530
committerKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>2018-05-03 17:36:55 +0530
commita562e1cd620ca593140af68c5c9becf96bb2a4c5 (patch)
treed1cd232f6d2c7b2d2982651d9790327397fb9080
parent949e7b149aa492014dfaa8c38666e60c691caec8 (diff)
Make use of entrySet
Issue-ID: CLI-100 Change-Id: I4c8dbedfbeb29ceaf7f4410805220b2ce0aea361 Signed-off-by: Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>
-rw-r--r--profiles/http/src/main/java/org/onap/cli/fw/http/schema/OnapCommandSchemaHttpLoader.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/profiles/http/src/main/java/org/onap/cli/fw/http/schema/OnapCommandSchemaHttpLoader.java b/profiles/http/src/main/java/org/onap/cli/fw/http/schema/OnapCommandSchemaHttpLoader.java
index 55295aa5..1a13819a 100644
--- a/profiles/http/src/main/java/org/onap/cli/fw/http/schema/OnapCommandSchemaHttpLoader.java
+++ b/profiles/http/src/main/java/org/onap/cli/fw/http/schema/OnapCommandSchemaHttpLoader.java
@@ -176,15 +176,15 @@ public class OnapCommandSchemaHttpLoader {
validationMap.put(OnapCommandHttpConstants.AUTH, OnapCommandHttpConstants.AUTH_VALUES);
validationMap.put(OnapCommandHttpConstants.MODE, OnapCommandHttpConstants.MODE_VALUES);
- for (String secKey : validationMap.keySet()) {
- if (serviceMap.containsKey(secKey)) {
- Object obj = serviceMap.get(secKey);
+ for (Map.Entry<String, String> secKey : validationMap.entrySet()) {
+ if (serviceMap.containsKey(secKey.getKey())) {
+ Object obj = serviceMap.get(secKey.getKey());
if (obj == null) {
- errorList.add(ATTRIBUTE + secKey + "' under '" + OnapCommandHttpConstants.SERVICE + "' is empty");
+ errorList.add(ATTRIBUTE + secKey.getKey() + "' under '" + OnapCommandHttpConstants.SERVICE + "' is empty");
} else {
String value = String.valueOf(obj);
- if (!OnapCommandConfig.getCommaSeparatedList(validationMap.get(secKey)).contains(value)) {
- errorList.add(ATTRIBUTE + secKey + "' contains invalid value. Valide values are "
+ if (!OnapCommandConfig.getCommaSeparatedList(validationMap.get(secKey.getKey())).contains(value)) {
+ errorList.add(ATTRIBUTE + secKey.getKey() + "' contains invalid value. Valide values are "
+ OnapCommandConfig.getCommaSeparatedList(validationMap.get(key1))); //
}
}