summaryrefslogtreecommitdiffstats
path: root/bpmn/MSOCoreBPMN/src
diff options
context:
space:
mode:
authorSeshu Kumar M <seshu.kumar.m@huawei.com>2017-09-25 17:03:44 +0000
committerGerrit Code Review <gerrit@onap.org>2017-09-25 17:03:44 +0000
commit9de6356ca090527af9b2e1f1851d03670a9535c1 (patch)
tree88c7b3f367c94f7aac566f7ed2b920685f56429e /bpmn/MSOCoreBPMN/src
parentf82af2d09e6bd8efd12b20f98d0dcdf4e038557d (diff)
parentcf1d4c5a274ecddf6098ed813806831d34a3488b (diff)
Merge "Fixed string literal comparision redundant code"
Diffstat (limited to 'bpmn/MSOCoreBPMN/src')
-rw-r--r--bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/json/JsonUtils.java10
1 files changed, 4 insertions, 6 deletions
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 d5170af22d..d0de819e03 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
@@ -156,7 +156,7 @@ public class JsonUtils {
str = null;
}
// append the content to the XML output
- if (key.equals("content")) {
+ if ("content".equals(key)) {
if (curObj instanceof JSONArray) {
jsonArr = (JSONArray) curObj;
len = jsonArr.length();
@@ -952,11 +952,9 @@ public class JsonUtils {
try {
Object rawValue = getJsonRawValue(jsonStr, keys);
- if (rawValue == null) {
- return false;
- } else {
- return true;
- }
+
+ return !(rawValue == null);
+
} catch (Exception e) {
msoLogger.debug("jsonElementExist(): unable to determine if json element exist. Exception is: " + e.toString(),e);
}