Skip to content

Erroneous check in JSONObject merge Method #51

Open
@jstueckrath

Description

@jstueckrath

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions