Skip to content

Commit 49ae992

Browse files
author
vkorukanti
committed
ARROW-1877: Fix incorrect equals method in JsonStringArrayList
Currently it uses containsAll which could return wrong results. Ex. e1: [true, true, false], e2: [true, false, false]. Remove the equals method and fallback on super class method which has the correct implementation.
1 parent ded2402 commit 49ae992

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

java/vector/src/main/java/org/apache/arrow/vector/util/JsonStringArrayList.java

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
package org.apache.arrow.vector.util;
2020

2121
import java.util.ArrayList;
22-
import java.util.List;
2322

2423
import com.fasterxml.jackson.core.JsonProcessingException;
2524
import com.fasterxml.jackson.databind.ObjectMapper;
@@ -40,21 +39,6 @@ public JsonStringArrayList(int size) {
4039
super(size);
4140
}
4241

43-
@Override
44-
public boolean equals(Object obj) {
45-
if (this == obj) {
46-
return true;
47-
}
48-
if (obj == null) {
49-
return false;
50-
}
51-
if (!(obj instanceof List)) {
52-
return false;
53-
}
54-
List<?> other = (List<?>) obj;
55-
return this.size() == other.size() && this.containsAll(other);
56-
}
57-
5842
@Override
5943
public final String toString() {
6044
try {

0 commit comments

Comments
 (0)