I have in my method the snippet below:
JSONParser jsonParser = new JSONParser();
try {
Object obj = jsonParser.parse(new InputStreamReader(is));
JSONObject jsonObj = (JSONObject) obj;
JSONArray jsonArray = (JSONArray) jsonObj.get("JSON_NODE");
String jsonStr = jsonArray.toJSONString();
return (JSONObject)jsonParser.parse(jsonStr);
}
In SonarQube I am getting an issue "Object not created locally" on
String jsonStr = jsonArray.toJSONString();
I am trying to understand why I am getting this. Any help?