From: r.bogacki Date: Tue, 9 Jul 2019 11:45:37 +0000 (+0200) Subject: Sonar fixes in OrchestrationRequests X-Git-Tag: 1.5.2~222^2 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F83%2F91083%2F1;p=so.git Sonar fixes in OrchestrationRequests Sonar fixes in OrchestrationRequests according to the Sonar analysis. -Removed unnecessary code. -Removed unused variables. Issue-ID: SO-2101 Signed-off-by: Robert Bogacki Change-Id: I564f35519c5063028e1cf540eb81ab81cf923fd5 --- diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/OrchestrationRequests.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/OrchestrationRequests.java index ba69355d5e..9e92c293bf 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/OrchestrationRequests.java +++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/OrchestrationRequests.java @@ -165,13 +165,11 @@ public class OrchestrationRequests { @QueryParam("includeCloudRequest") boolean includeCloudRequest, @QueryParam(value = "format") String format) throws ApiException { - long startTime = System.currentTimeMillis(); - MultivaluedMap queryParams = ui.getQueryParameters(); - List activeRequests = null; + List activeRequests; - GetOrchestrationListResponse orchestrationList = null; + GetOrchestrationListResponse orchestrationList; Map> orchestrationMap; String apiVersion = version.substring(1); @@ -222,12 +220,10 @@ public class OrchestrationRequests { public Response unlockOrchestrationRequest(String requestJSON, @PathParam("requestId") String requestId, @PathParam("version") String version) throws ApiException { - long startTime = System.currentTimeMillis(); logger.debug("requestId is: {}", requestId); - ServiceInstancesRequest sir = null; + ServiceInstancesRequest sir; - InfraActiveRequests infraActiveRequest = null; - Request request = null; + InfraActiveRequests infraActiveRequest; try { ObjectMapper mapper = new ObjectMapper();