diff options
author | sindhu3672 <arcot.sindhuri@huawei.com> | 2019-08-12 12:31:22 +0530 |
---|---|---|
committer | sindhu3672 <arcot.sindhuri@huawei.com> | 2019-08-12 12:31:22 +0530 |
commit | 864da2792ed4ba650c21f9b616d3f45ca52782dc (patch) | |
tree | 154f624233a26893dfc1c90db92c6cc439a38e7d /mso-api-handlers/mso-api-handler-infra/src/main/java | |
parent | 3081381bb2ba253fc0aa34203c90ea8bf63b26b4 (diff) |
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 <arcot.sindhuri@huawei.com>
Change-Id: I8ba57bd9c3c548a35b90d9324f1d214985c3c539
Diffstat (limited to 'mso-api-handlers/mso-api-handler-infra/src/main/java')
-rw-r--r-- | mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/RequestHandlerUtils.java | 4 |
1 files 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"); |