diff options
author | Rupinder <rupinsi1@in.ibm.com> | 2020-06-01 14:27:56 +0530 |
---|---|---|
committer | Takamune Cho <takamune.cho@att.com> | 2020-06-04 15:29:06 +0000 |
commit | 3baea8e7e5ac5039d27ecd2d504f4ea24034f730 (patch) | |
tree | c805fd788604d3ccb7f5b42baa7226f299500248 /appc-inbound | |
parent | aa350b8ce81033db26dbb88f47c072bd0f32ce86 (diff) |
lower code smells
Issue-ID: APPC-1859
Change-Id: I6d0a7563199355a446345f568415a78856c0cfa6
Signed-off-by: Rupinder <rupinsi1@in.ibm.com>
Diffstat (limited to 'appc-inbound')
2 files changed, 7 insertions, 7 deletions
diff --git a/appc-inbound/appc-interfaces-service/bundle/src/main/java/org/onap/appc/interfaces/service/InterfacesServiceProviderImpl.java b/appc-inbound/appc-interfaces-service/bundle/src/main/java/org/onap/appc/interfaces/service/InterfacesServiceProviderImpl.java index ba05de733..22822d89e 100644 --- a/appc-inbound/appc-interfaces-service/bundle/src/main/java/org/onap/appc/interfaces/service/InterfacesServiceProviderImpl.java +++ b/appc-inbound/appc-interfaces-service/bundle/src/main/java/org/onap/appc/interfaces/service/InterfacesServiceProviderImpl.java @@ -50,7 +50,7 @@ public class InterfacesServiceProviderImpl implements InterfacesServiceService{ log.info("Received Request: " + input.getRequest().getRequestId() + " Action : " + input.getRequest().getAction() + " with RequestData :" + input.getRequest().getRequestData() + " and data-Type : " + input.getRequest().getRequestDataType()); - String request_id = input.getRequest().getRequestId(); + String requestId = input.getRequest().getRequestId(); String action = input.getRequest().getAction(); ResponseInfoBuilder responseInfoBuilder = new ResponseInfoBuilder(); ExecuteServiceOutputBuilder executeServicebuilder = new ExecuteServiceOutputBuilder(); @@ -59,7 +59,7 @@ public class InterfacesServiceProviderImpl implements InterfacesServiceService{ try{ String response = serviceExecutor.execute(action, input.getRequest().getRequestData(), input.getRequest().getRequestDataType()); responseInfoBuilder.setBlock(response); - responseInfoBuilder.setRequestId(request_id); + responseInfoBuilder.setRequestId(requestId); statusBuilder.setCode("400"); statusBuilder.setMessage("success"); } diff --git a/appc-inbound/appc-interfaces-service/bundle/src/main/java/org/onap/appc/interfaces/service/executorImpl/ServiceExecutorImpl.java b/appc-inbound/appc-interfaces-service/bundle/src/main/java/org/onap/appc/interfaces/service/executorImpl/ServiceExecutorImpl.java index f82402f45..405dfcfef 100644 --- a/appc-inbound/appc-interfaces-service/bundle/src/main/java/org/onap/appc/interfaces/service/executorImpl/ServiceExecutorImpl.java +++ b/appc-inbound/appc-interfaces-service/bundle/src/main/java/org/onap/appc/interfaces/service/executorImpl/ServiceExecutorImpl.java @@ -92,8 +92,8 @@ public class ServiceExecutorImpl { AaiService aaiService = getAaiService(aaiClient); SvcLogicContext ctx = getSvcLogicContext(); - Map<String, String> params = new HashMap<String, String>(); - List<String> inProgressVServerIds = new ArrayList<String>(); + Map<String, String> params = new HashMap<>(); + List<String> inProgressVServerIds = new ArrayList<>(); String currentVnfcVserverId = new String(); String currentRequestVnfcName = scopeOverlap.getCurrentRequest().getActionIdentifiers().getVnfcName(); String currentRequestVServerId = scopeOverlap.getCurrentRequest().getActionIdentifiers().getvServerId(); @@ -101,10 +101,10 @@ public class ServiceExecutorImpl { params.put("vnfId", scopeOverlap.getVnfId()); try { aaiService.getGenericVnfInfo(params, ctx); - int vm_count = Integer.parseInt(ctx.getAttribute("vm-count")); + int vmCount = Integer.parseInt(ctx.getAttribute("vm-count")); for(Request inprogressRequest:inProgressRequests){ if(inprogressRequest.getActionIdentifiers().getVnfcName() != null){ - for (int i = 0; i < vm_count; i++) { + for (int i = 0; i < vmCount; i++) { if (ctx.getAttribute("vm[" + i + "].vnfc-name") != null && ctx.getAttribute("vm[" + i + "].vnfc-name") .equals(inprogressRequest.getActionIdentifiers().getVnfcName())) { String newInProgressVserverId = ctx.getAttribute("vm[" + i + "].vserver-id"); @@ -118,7 +118,7 @@ public class ServiceExecutorImpl { if(inProgVserverIds.getActionIdentifiers().getvServerId() != null) inProgressVServerIds.add(inProgVserverIds.getActionIdentifiers().getvServerId()); if(currentRequestVnfcName != null){ - for (int i = 0; i < vm_count; i++) { + for (int i = 0; i < vmCount; i++) { if (ctx.getAttribute("vm[" + i + "].vnfc-name") != null && ctx.getAttribute("vm[" + i + "].vnfc-name") .equals(currentRequestVnfcName)) { currentVnfcVserverId = ctx.getAttribute("vm[" + i + "].vserver-id"); |