Use Map's entrySet instead of keySet
Major Sonar issue in sli/adaptors module
*When both keys and values of map are used,
using entrySet is more efficient
Issue-Id: CCSDK-87
Change-Id: I1a8df0bc42de2c75b5217fd2570fb579d1897760
Signed-off-by: surya-huawei <a.u.surya@huawei.com>
diff --git a/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIDeclarations.java b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIDeclarations.java
index 447da3f..f1663d2 100755
--- a/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIDeclarations.java
+++ b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIDeclarations.java
@@ -1580,8 +1580,8 @@
j++;
}
AAIRequest rlRequest = AAIRequest.createRequest(relatedTo, relParams);
- for(String key : relParams.keySet()) {
- rlRequest.addRequestProperty(key, relParams.get(key));
+ for(Map.Entry<String,String> entry : relParams.entrySet()) {
+ rlRequest.addRequestProperty(entry.getKey(), entry.getValue());
}
String path = rlRequest.updatePathDataValues(null);
relationship.setRelatedLink(path);