From: shashikanth Date: Tue, 19 Sep 2017 11:57:19 +0000 (+0530) Subject: Fix Blocker/Critical sonar issues X-Git-Tag: v1.1.0~326^2 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=ab9de38d32244138d1258db9ae7528a1ecd5bdd4;p=so.git Fix Blocker/Critical sonar issues Fix Blocker/Critical sonar issues in so module https://sonar.onap.org/component_issues?id=org.openecomp.so%3Aso#resolved=false|severities=BLOCKER Fixed condition that always evaluate to "true" Issue-Id:SO-118 Change-Id: Iceec8653cad6c2ca5dc148644c761075fe207a66 Signed-off-by: shashikanth.vh --- diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/json/JsonUtils.java b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/json/JsonUtils.java index 9dbd4b171d..d5170af22d 100644 --- a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/json/JsonUtils.java +++ b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/json/JsonUtils.java @@ -519,9 +519,7 @@ public class JsonUtils { // String isDebugLogEnabled = "true"; try { JSONObject jsonObj = new JSONObject(jsonStr); - if (jsonObj != null) { - return getJsonValueForKey(jsonObj, key); - } + return getJsonValueForKey(jsonObj, key); } catch (Exception e) { msoLogger.debug("getJsonValueForKey(): unable to parse json to retrieve value for field=" + key + ". Exception was: " + e.toString(), e); }