Move the "content" string literal on the left side of this string comparison.
Issue-Id:SO-118
Change-Id: Ice9ef2d94f594669f0399d31e5346e3c0be66c13
Signed-off-by: shashikanth.vh <shashikanth.vh@huawei.com>
str = null;\r
}\r
// append the content to the XML output\r
str = null;\r
}\r
// append the content to the XML output\r
- if (key.equals("content")) {\r
+ if ("content".equals(key)) {\r
if (curObj instanceof JSONArray) {\r
jsonArr = (JSONArray) curObj;\r
len = jsonArr.length();\r
if (curObj instanceof JSONArray) {\r
jsonArr = (JSONArray) curObj;\r
len = jsonArr.length();\r
\r
try {\r
Object rawValue = getJsonRawValue(jsonStr, keys);\r
\r
try {\r
Object rawValue = getJsonRawValue(jsonStr, keys);\r
- if (rawValue == null) {\r
- return false;\r
- } else {\r
- return true;\r
- }\r
+\r
+ return !(rawValue == null);\r
+\r
} catch (Exception e) {\r
msoLogger.debug("jsonElementExist(): unable to determine if json element exist. Exception is: " + e.toString(),e);\r
}\r
} catch (Exception e) {\r
msoLogger.debug("jsonElementExist(): unable to determine if json element exist. Exception is: " + e.toString(),e);\r
}\r