diff options
author | Steve Smokowski <ss835w@att.com> | 2019-07-18 11:53:09 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-07-18 11:53:09 +0000 |
commit | 6c9e17ce89ec50468371247bb34881bdfcfc9fbd (patch) | |
tree | d5563fded495edaf6b47df9912464d7429401f3b /mso-api-handlers | |
parent | 597aba038c90ef34a8058794c73a2213d778673e (diff) | |
parent | c7113532f34e920d6cfe773cd84591fc863801ae (diff) |
Merge "Major Sonar fixes"
Diffstat (limited to 'mso-api-handlers')
-rw-r--r-- | mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/CloudResourcesOrchestration.java | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/CloudResourcesOrchestration.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/CloudResourcesOrchestration.java index 20e8fed32d..e9cd303c0b 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/CloudResourcesOrchestration.java +++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/CloudResourcesOrchestration.java @@ -88,9 +88,9 @@ public class CloudResourcesOrchestration { public Response unlockOrchestrationRequest(String requestJSON, @PathParam("requestId") String requestId, @PathParam("version") String version) throws ApiException { TenantIsolationRequest msoRequest = new TenantIsolationRequest(requestId); - InfraActiveRequests infraActiveRequest = null; + InfraActiveRequests infraActiveRequest; - CloudOrchestrationRequest cor = null; + CloudOrchestrationRequest cor; logger.debug("requestId is: {}", requestId); @@ -140,8 +140,8 @@ public class CloudResourcesOrchestration { } else { String status = infraActiveRequest.getRequestStatus(); - if (status.equalsIgnoreCase("IN_PROGRESS") || status.equalsIgnoreCase("PENDING") - || status.equalsIgnoreCase("PENDING_MANUAL_TASK")) { + if ("IN_PROGRESS".equalsIgnoreCase(status) || "PENDING".equalsIgnoreCase(status) + || "PENDING_MANUAL_TASK".equalsIgnoreCase(status)) { infraActiveRequest.setRequestStatus("UNLOCKED"); infraActiveRequest.setLastModifiedBy(Constants.MODIFIED_BY_APIHANDLER); infraActiveRequest.setRequestId(requestId); @@ -181,8 +181,7 @@ public class CloudResourcesOrchestration { String requestId = requestIdKey.get(0); CloudOrchestrationResponse cloudOrchestrationGetResponse = new CloudOrchestrationResponse(); - TenantIsolationRequest tenantIsolationRequest = new TenantIsolationRequest(requestId); - InfraActiveRequests requestDB = null; + InfraActiveRequests requestDB; try { requestDB = requestDbClient.getInfraActiveRequestbyRequestId(requestId); @@ -213,8 +212,8 @@ public class CloudResourcesOrchestration { } else { TenantIsolationRequest tenantIsolationRequest = new TenantIsolationRequest(); - List<InfraActiveRequests> activeRequests = null; - CloudOrchestrationRequestList orchestrationList = null; + List<InfraActiveRequests> activeRequests; + CloudOrchestrationRequestList orchestrationList; Map<String, String> orchestrationMap; @@ -233,7 +232,7 @@ public class CloudResourcesOrchestration { } activeRequests = requestDbClient.getCloudOrchestrationFiltersFromInfraActive(orchestrationMap); orchestrationList = new CloudOrchestrationRequestList(); - List<CloudOrchestrationResponse> requestLists = new ArrayList<CloudOrchestrationResponse>(); + List<CloudOrchestrationResponse> requestLists = new ArrayList<>(); for (InfraActiveRequests infraActive : activeRequests) { |