Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion JSONObject.java
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ public JSONObject(JSONTokener x) throws JSONException {
* @throws JSONException
*/
public JSONObject(Map map) {
this.map = new HashMap();
this.map = map instanceof TreeMap ? new TreeMap() : map instanceof LinkedHashMap ? new LinkedHashMap() : new HashMap();
if (map != null) {
Iterator i = map.entrySet().iterator();
while (i.hasNext()) {
Expand Down