Skip to content

Commit 753a815

Browse files
committed
HashMap to LinkedHashMap.
1 parent d98dc0b commit 753a815

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

JSONObject.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ of this software and associated documentation files (the "Software"), to deal
3131
import java.lang.reflect.Method;
3232
import java.util.Collection;
3333
import java.util.Enumeration;
34-
import java.util.HashMap;
34+
import java.util.LinkedHashMap;
3535
import java.util.Iterator;
3636
import java.util.Locale;
3737
import java.util.Map;
@@ -144,7 +144,7 @@ public String toString() {
144144
* Construct an empty JSONObject.
145145
*/
146146
public JSONObject() {
147-
this.map = new HashMap();
147+
this.map = new LinkedHashMap();
148148
}
149149

150150

@@ -233,7 +233,7 @@ public JSONObject(JSONTokener x) throws JSONException {
233233
* @throws JSONException
234234
*/
235235
public JSONObject(Map map) {
236-
this.map = new HashMap();
236+
this();
237237
if (map != null) {
238238
Iterator i = map.entrySet().iterator();
239239
while (i.hasNext()) {

0 commit comments

Comments
 (0)