diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..8593f4839 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +# ignore eclipse project files +.project +.classpath diff --git a/JSONArray.java b/JSONArray.java index 480b74605..4a82b998a 100644 --- a/JSONArray.java +++ b/JSONArray.java @@ -1289,7 +1289,7 @@ public boolean similar(Object other) { Object valueThis = this.myArrayList.get(i); Object valueOther = ((JSONArray)other).myArrayList.get(i); if(valueThis == valueOther) { - return true; + continue; } if(valueThis == null) { return false; diff --git a/JSONObject.java b/JSONObject.java index 54efa6e69..f3a715f1a 100644 --- a/JSONObject.java +++ b/JSONObject.java @@ -1844,7 +1844,7 @@ public boolean similar(Object other) { Object valueThis = entry.getValue(); Object valueOther = ((JSONObject)other).get(name); if(valueThis == valueOther) { - return true; + continue; } if(valueThis == null) { return false;