From 864da2792ed4ba650c21f9b616d3f45ca52782dc Mon Sep 17 00:00:00 2001 From: sindhu3672 Date: Mon, 12 Aug 2019 12:31:22 +0530 Subject: Change string literal left side-avoid null pointer ex Change string literal left side so.adapters.vnfmadapter WebSecurityConfigImpl class Issue-ID: SO-2187 Signed-off-by: sindhu3672 Change-Id: I8ba57bd9c3c548a35b90d9324f1d214985c3c539 --- .../main/java/org/onap/so/apihandlerinfra/RequestHandlerUtils.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/RequestHandlerUtils.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/RequestHandlerUtils.java index 9ab95a2319..b6f3f82ab1 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/RequestHandlerUtils.java +++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/RequestHandlerUtils.java @@ -295,7 +295,7 @@ public class RequestHandlerUtils extends AbstractRestHandler { String instanceName, String requestScope, InfraActiveRequests currentActiveReq) throws ApiException { InfraActiveRequests dup = null; try { - if (!(instanceName == null && requestScope.equals("service") && (action == Action.createInstance + if (!(instanceName == null && "service".equals(requestScope) && (action == Action.createInstance || action == Action.activateInstance || action == Action.assignInstance))) { dup = infraActiveRequestsClient.checkInstanceNameDuplicate(instanceIdMap, instanceName, requestScope); } @@ -334,7 +334,7 @@ public class RequestHandlerUtils extends AbstractRestHandler { updateStatus(duplicateRecord, Status.COMPLETE, "Request Completed"); } for (HistoricProcessInstance instance : response.getBody()) { - if (instance.getState().equals("ACTIVE")) { + if (("ACTIVE").equals(instance.getState())) { return true; } else { updateStatus(duplicateRecord, Status.COMPLETE, "Request Completed"); -- cgit 1.2.3-korg