mirror of
https://github.com/ethauvin/JSON-java.git
synced 2025-06-17 07:50:52 -07:00
Merge pull request #380 from johnjaylward/FixFalsePositiveSimilar
Fix for false positives in similar functions
This commit is contained in:
commit
28e09dc493
3 changed files with 5 additions and 2 deletions
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
# ignore eclipse project files
|
||||||
|
.project
|
||||||
|
.classpath
|
|
@ -1289,7 +1289,7 @@ public class JSONArray implements Iterable<Object> {
|
||||||
Object valueThis = this.myArrayList.get(i);
|
Object valueThis = this.myArrayList.get(i);
|
||||||
Object valueOther = ((JSONArray)other).myArrayList.get(i);
|
Object valueOther = ((JSONArray)other).myArrayList.get(i);
|
||||||
if(valueThis == valueOther) {
|
if(valueThis == valueOther) {
|
||||||
return true;
|
continue;
|
||||||
}
|
}
|
||||||
if(valueThis == null) {
|
if(valueThis == null) {
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -1844,7 +1844,7 @@ public class JSONObject {
|
||||||
Object valueThis = entry.getValue();
|
Object valueThis = entry.getValue();
|
||||||
Object valueOther = ((JSONObject)other).get(name);
|
Object valueOther = ((JSONObject)other).get(name);
|
||||||
if(valueThis == valueOther) {
|
if(valueThis == valueOther) {
|
||||||
return true;
|
continue;
|
||||||
}
|
}
|
||||||
if(valueThis == null) {
|
if(valueThis == null) {
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue