Sonar Fix: AAIResourceNode.java 26/74126/2
authorArundathi Patil <arundpil@in.ibm.com>
Mon, 3 Dec 2018 09:58:33 +0000 (15:28 +0530)
committerPatrick Brady <patrick.brady@att.com>
Thu, 3 Jan 2019 23:47:23 +0000 (23:47 +0000)
Fixed sonar issues/code-smells across this file.

Issue-ID: APPC-1265
Change-Id: Id0339b89f05ba3d55d6b01a0c885fabcadcd86da
Signed-off-by: Arundathi Patil <arundpil@in.ibm.com>
appc-outbound/appc-aai-client/provider/src/main/java/org/onap/appc/aai/client/node/AAIResourceNode.java

index 853565f..e32cc94 100644 (file)
@@ -84,15 +84,14 @@ public class AAIResourceNode implements SvcLogicJavaPlugin {
 
             log.debug("Cloud Owner" + cloudOwnerValue);
             log.debug("CloudRegionId" + cloudOwnerValue);
-            SvcLogicContext cloudCtx = new SvcLogicContext();
             Map<String, String> paramsCloud = new HashMap<String, String>();
             paramsCloud.put(AppcAaiClientConstant.INPUT_PARAM_RESPONSE_PREFIX,
                     inParams.get(AppcAaiClientConstant.INPUT_PARAM_RESPONSE_PREFIX));
 
             if(StringUtils.isNotBlank(cloudOwnerValue)&&StringUtils.isNotBlank(cloudRegionValue)) {
 
-                paramsCloud.put("cloudOwner", cloudOwnerValue);
-                paramsCloud.put("cloudRegionId", cloudRegionValue);
+                paramsCloud.put(PARAM_CLOUD_OWNER, cloudOwnerValue);
+                paramsCloud.put(PARAM_CLOUD_REGION_ID, cloudRegionValue);
 
                 aai.getIdentityUrl(paramsCloud, ctx);
             }
@@ -511,7 +510,7 @@ public class AAIResourceNode implements SvcLogicJavaPlugin {
         return params;
     }
 
-    public void getVfModuleModelInfo(Map<String, String> inParams, SvcLogicContext ctx) throws SvcLogicException {
+    public void getVfModuleModelInfo(Map<String, String> inParams, SvcLogicContext ctx) {
         log.info("vfModuleInfo()::Retrieving vf-module information :" + inParams.toString());
         String responsePrefix = inParams.get(AppcAaiClientConstant.INPUT_PARAM_RESPONSE_PREFIX);
         try {
@@ -571,7 +570,7 @@ public class AAIResourceNode implements SvcLogicJavaPlugin {
 
     }
 
-    public void getFormattedValue(Map<String, String> inParams, SvcLogicContext ctx) throws SvcLogicException {
+    public void getFormattedValue(Map<String, String> inParams, SvcLogicContext ctx) {
         log.info("getFormattedValue()::Formatting values :" + inParams.toString());
         String responsePrefix = inParams.get(AppcAaiClientConstant.INPUT_PARAM_RESPONSE_PREFIX);
         try {