Skip to content

Commit

Permalink
ARROW-1877: Fix incorrect equals method in JsonStringArrayList
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
vkorukanti committed Dec 1, 2017
1 parent ded2402 commit 49ae992
Showing 1 changed file with 0 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
package org.apache.arrow.vector.util;

import java.util.ArrayList;
import java.util.List;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
Expand All @@ -40,21 +39,6 @@ public JsonStringArrayList(int size) {
super(size);
}

@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (!(obj instanceof List)) {
return false;
}
List<?> other = (List<?>) obj;
return this.size() == other.size() && this.containsAll(other);
}

@Override
public final String toString() {
try {
Expand Down

0 comments on commit 49ae992

Please sign in to comment.