Sonar fixes in OrchestrationRequests 83/91083/1
authorr.bogacki <r.bogacki@samsung.com>
Tue, 9 Jul 2019 11:45:37 +0000 (13:45 +0200)
committerr.bogacki <r.bogacki@samsung.com>
Tue, 9 Jul 2019 11:45:52 +0000 (13:45 +0200)
Sonar fixes in OrchestrationRequests according to the Sonar analysis.
-Removed unnecessary code.
-Removed unused variables.

Issue-ID: SO-2101
Signed-off-by: Robert Bogacki <r.bogacki@samsung.com>
Change-Id: I564f35519c5063028e1cf540eb81ab81cf923fd5

mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/OrchestrationRequests.java

index ba69355..9e92c29 100644 (file)
@@ -165,13 +165,11 @@ public class OrchestrationRequests {
             @QueryParam("includeCloudRequest") boolean includeCloudRequest, @QueryParam(value = "format") String format)
             throws ApiException {
 
-        long startTime = System.currentTimeMillis();
-
         MultivaluedMap<String, String> queryParams = ui.getQueryParameters();
 
-        List<InfraActiveRequests> activeRequests = null;
+        List<InfraActiveRequests> activeRequests;
 
-        GetOrchestrationListResponse orchestrationList = null;
+        GetOrchestrationListResponse orchestrationList;
         Map<String, List<String>> 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();