Open
Description
I noticed a problem in the method protected static JSONArray merge(JSONArray o1, Object o2)
of the JSONObject class. It contains the following check:
if (o1 instanceof JSONArray)
return merge(o1, (JSONArray) o2);
which does not make much sense, since o1 is already of type JSONArray. I believe o2 was meant to be checked here. The implementation would then be analogous to the method protected static JSONObject merge(JSONObject o1, Object o2)
.
Since I only spotted this by coincidence, I do not know the effects of this bug.