From ab9de38d32244138d1258db9ae7528a1ecd5bdd4 Mon Sep 17 00:00:00 2001 From: shashikanth Date: Tue, 19 Sep 2017 17:27:19 +0530 Subject: 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 --- .../src/main/java/org/openecomp/mso/bpmn/core/json/JsonUtils.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'bpmn') 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); } -- cgit 1.2.3-korg