diff options
author | Seshu Kumar M <seshu.kumar.m@huawei.com> | 2017-09-25 17:03:44 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2017-09-25 17:03:44 +0000 |
commit | 9de6356ca090527af9b2e1f1851d03670a9535c1 (patch) | |
tree | 88c7b3f367c94f7aac566f7ed2b920685f56429e | |
parent | f82af2d09e6bd8efd12b20f98d0dcdf4e038557d (diff) | |
parent | cf1d4c5a274ecddf6098ed813806831d34a3488b (diff) |
Merge "Fixed string literal comparision redundant code"
-rw-r--r-- | bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/json/JsonUtils.java | 10 |
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);
}
|