From 3098bcd71f40750cce76c28ca74f89be1d76c536 Mon Sep 17 00:00:00 2001 From: Sandeep J Date: Mon, 20 Aug 2018 19:23:47 +0530 Subject: fixed few sonar issues in AAIResourceNode.java fixed few Sonar issues Issue-ID: APPC-1166 Change-Id: Idc11b37bb22105750146c2bccd84f173f086c61f Signed-off-by: Sandeep J --- .../main/java/org/onap/appc/aai/client/node/AAIResourceNode.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'appc-outbound') diff --git a/appc-outbound/appc-aai-client/provider/src/main/java/org/onap/appc/aai/client/node/AAIResourceNode.java b/appc-outbound/appc-aai-client/provider/src/main/java/org/onap/appc/aai/client/node/AAIResourceNode.java index cc084d426..cc3e804cc 100644 --- a/appc-outbound/appc-aai-client/provider/src/main/java/org/onap/appc/aai/client/node/AAIResourceNode.java +++ b/appc-outbound/appc-aai-client/provider/src/main/java/org/onap/appc/aai/client/node/AAIResourceNode.java @@ -6,6 +6,8 @@ * ================================================================================ * Copyright (C) 2017 Amdocs * ============================================================================= + * Modifications Copyright (C) 2018 IBM. + * ============================================================================= * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -119,7 +121,7 @@ public class AAIResourceNode implements SvcLogicJavaPlugin { SvcLogicContext vmServerCtx = new SvcLogicContext(); - Map paramsVm = new HashMap(); + Map paramsVm = new HashMap<>(); paramsVm.put(PARAM_VSERVER_ID, ctx.getAttribute(responsePrefix + "vm[" + i + STR_VSERVER_ID)); paramsVm.put(PARAM_TENANT_ID, ctx.getAttribute(responsePrefix + "vm[" + i + STR_TENANT_ID)); paramsVm.put(PARAM_CLOUD_OWNER, ctx.getAttribute(responsePrefix + "vm[" + i + STR_CLOUD_OWNER)); @@ -130,7 +132,7 @@ public class AAIResourceNode implements SvcLogicJavaPlugin { aai.getVMInfo(paramsVm, vmServerCtx); - HashMap vserverMap = new HashMap(); + HashMap vserverMap = new HashMap<>(); vserverMap.put("vserver-id", ctx.getAttribute(responsePrefix + "vm[" + i + STR_VSERVER_ID)); vserverMap.put("tenant-id", ctx.getAttribute(responsePrefix + "vm[" + i + STR_TENANT_ID)); vserverMap.put("cloud-owner", ctx.getAttribute(responsePrefix + "vm[" + i + STR_CLOUD_OWNER)); @@ -139,7 +141,7 @@ public class AAIResourceNode implements SvcLogicJavaPlugin { // Parameters returned by getVMInfo vserverMap.put(PARAM_VSERVER_NAME, vmServerCtx.getAttribute(responsePrefix + "vm.vserver-name")); vserverMap.put("vf-module-id", vmServerCtx.getAttribute(responsePrefix + "vm.vf-module-id")); - vserverMap.put("vserver-selflink", vmServerCtx.getAttribute(responsePrefix + "vm.vserver-selflink")); + vserverMap.put(PARAM_VSERVER_SELFLINK, vmServerCtx.getAttribute(responsePrefix + "vm.vserver-selflink")); log.info("VSERVER-LINK VALUE:" + vmServerCtx.getAttribute(responsePrefix + "vm.vserver-selflink")); -- cgit 1.2.3-korg