From 49ae992b5687b5d2819cfb7e891f176dc955836a Mon Sep 17 00:00:00 2001 From: vkorukanti Date: Fri, 1 Dec 2017 15:38:52 -0800 Subject: [PATCH] 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. --- .../arrow/vector/util/JsonStringArrayList.java | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/java/vector/src/main/java/org/apache/arrow/vector/util/JsonStringArrayList.java b/java/vector/src/main/java/org/apache/arrow/vector/util/JsonStringArrayList.java index 480bd76d445b0..b6db29a7fc64e 100644 --- a/java/vector/src/main/java/org/apache/arrow/vector/util/JsonStringArrayList.java +++ b/java/vector/src/main/java/org/apache/arrow/vector/util/JsonStringArrayList.java @@ -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; @@ -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 {