From 58f195402881a8b59fe394578c133fb7689c06d1 Mon Sep 17 00:00:00 2001 From: surya-huawei Date: Sun, 17 Sep 2017 23:10:57 +0530 Subject: Fix Sonar issue in sli/northbound module One major issue * move string literals to left side of string comparison Issue-Id: CCSDK-87 Change-Id: Ibd1146a8a12dccc56fb620fe5830efb545ac39a1 Signed-off-by: surya-huawei --- .../src/main/java/org/onap/ccsdk/sli/northbound/DataChangeProvider.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'dataChange/provider') diff --git a/dataChange/provider/src/main/java/org/onap/ccsdk/sli/northbound/DataChangeProvider.java b/dataChange/provider/src/main/java/org/onap/ccsdk/sli/northbound/DataChangeProvider.java index d47bcd1b3..0977fa0b7 100644 --- a/dataChange/provider/src/main/java/org/onap/ccsdk/sli/northbound/DataChangeProvider.java +++ b/dataChange/provider/src/main/java/org/onap/ccsdk/sli/northbound/DataChangeProvider.java @@ -148,7 +148,7 @@ public class DataChangeProvider implements AutoCloseable, DataChangeService { String errorCode = serviceDataBuilder.getDataChangeResponseCode(); - if ( errorCode != null && errorCode.length() != 0 && !( errorCode.equals("0")|| errorCode.equals("200"))) { + if (!("0".equals(errorCode) || "200".equals(errorCode))) { LOG.error("Returned FAILED for "+SVC_OPERATION+" error code: '" + errorCode + "'"); } else { LOG.info("Returned SUCCESS for "+SVC_OPERATION+" "); -- cgit 1.2.3-korg