aboutsummaryrefslogtreecommitdiffstats
path: root/mso-api-handlers/mso-requests-db/src
diff options
context:
space:
mode:
authorshashikanth <shashikanth.vh@huawei.com>2017-09-26 17:27:15 +0530
committerShashikanth VH <shashikanth.vh@huawei.com>2017-09-27 05:05:20 +0000
commit3080556a6bdaa164ce0e9b41a72c35c5da1dd3f1 (patch)
tree33af65dc78dd595e2f59a10e18a7e7d2a1b6cc64 /mso-api-handlers/mso-requests-db/src
parent35f3dda1f25d7c86d4436f3aa5ce985d76f135d6 (diff)
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 <shashikanth.vh@huawei.com>
Diffstat (limited to 'mso-api-handlers/mso-requests-db/src')
-rw-r--r--mso-api-handlers/mso-requests-db/src/main/java/org/openecomp/mso/requestsdb/MockRequestsDatabase.java6
1 files changed, 3 insertions, 3 deletions
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;
}
}
}