From 3080556a6bdaa164ce0e9b41a72c35c5da1dd3f1 Mon Sep 17 00:00:00 2001 From: shashikanth Date: Tue, 26 Sep 2017 17:27:15 +0530 Subject: Fixed string literal comparision issue Fix major sonar issues in so module https://sonar.onap.org/component_issues?id=org.openecomp.so%3Aso#resolved=false|severities=BLOCKER%2CMAJOR|rules=squid%3AS1132%2Csquid%3AS1143 Move the "GetLayer3ServiceDetailsRequest" string literal on the left side of this string comparison. Issue-Id: APPC-186 Change-Id: I927555425a3a6294eee56f9c7377abc9f4a9ad05 Signed-off-by: shashikanth.vh --- .../java/org/openecomp/mso/requestsdb/MockRequestsDatabase.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'mso-api-handlers/mso-requests-db/src/main/java/org/openecomp/mso/requestsdb') diff --git a/mso-api-handlers/mso-requests-db/src/main/java/org/openecomp/mso/requestsdb/MockRequestsDatabase.java b/mso-api-handlers/mso-requests-db/src/main/java/org/openecomp/mso/requestsdb/MockRequestsDatabase.java index c4ded174ba..e3c7cda3bd 100644 --- a/mso-api-handlers/mso-requests-db/src/main/java/org/openecomp/mso/requestsdb/MockRequestsDatabase.java +++ b/mso-api-handlers/mso-requests-db/src/main/java/org/openecomp/mso/requestsdb/MockRequestsDatabase.java @@ -60,10 +60,10 @@ public class MockRequestsDatabase { InfraActiveRequests returnRecord = null; if (record != null) { String requestAction = record.getRequestAction(); - if (requestAction == null || !requestAction.equals("GetLayer3ServiceDetailsRequest")) { + if (!"GetLayer3ServiceDetailsRequest".equals(requestAction)) { String status = record.getRequestStatus(); - if (status != null && status.equals("COMPLETED")) { - return returnRecord = record; + if ("COMPLETED".equals(status)) { + returnRecord = record; } } } -- cgit 1.2.3-korg