diff options
author | Bjørn Christian Seime <bjorncs@verizonmedia.com> | 2020-01-06 17:47:12 +0100 |
---|---|---|
committer | Bjørn Christian Seime <bjorncs@verizonmedia.com> | 2020-01-06 18:04:31 +0100 |
commit | ef00c557ff5e5b33f6f9fdef83f5357201562ec1 (patch) | |
tree | ef31d0365dc050b9f838b64b79508cdbfd680c30 /predicate-search/src/test/java/com/yahoo | |
parent | a8fe3ac9d28d8b484a9f3ea21417310c2512bb97 (diff) |
Remove use of common-lang in predicate-search
Diffstat (limited to 'predicate-search/src/test/java/com/yahoo')
2 files changed, 4 insertions, 5 deletions
diff --git a/predicate-search/src/test/java/com/yahoo/search/predicate/annotator/PredicateTreeAnnotatorTest.java b/predicate-search/src/test/java/com/yahoo/search/predicate/annotator/PredicateTreeAnnotatorTest.java index 5d7e668a0de..24aa59955bc 100644 --- a/predicate-search/src/test/java/com/yahoo/search/predicate/annotator/PredicateTreeAnnotatorTest.java +++ b/predicate-search/src/test/java/com/yahoo/search/predicate/annotator/PredicateTreeAnnotatorTest.java @@ -9,9 +9,8 @@ import com.yahoo.document.predicate.PredicateHash; import com.yahoo.document.predicate.RangeEdgePartition; import com.yahoo.document.predicate.RangePartition; import com.yahoo.search.predicate.index.Feature; -import com.yahoo.search.predicate.index.conjunction.IndexableFeatureConjunction; import com.yahoo.search.predicate.index.IntervalWithBounds; -import org.apache.commons.lang.ArrayUtils; +import com.yahoo.search.predicate.index.conjunction.IndexableFeatureConjunction; import org.junit.Test; import java.util.Arrays; @@ -232,7 +231,7 @@ public class PredicateTreeAnnotatorTest { long hash = PredicateHash.hash64(feature); List<Integer> actualIntervals = r.intervalMap.get(hash); assertNotNull(actualIntervals); - assertArrayEquals(ArrayUtils.toPrimitive(expectedIntervals), Ints.toArray(actualIntervals)); + assertArrayEquals(Ints.toArray(Arrays.asList(expectedIntervals)), Ints.toArray(actualIntervals)); } private static void assertBoundsContains(PredicateTreeAnnotations r, String feature, IntervalWithBounds expectedBounds) { diff --git a/predicate-search/src/test/java/com/yahoo/search/predicate/index/CachedPostingListCounterTest.java b/predicate-search/src/test/java/com/yahoo/search/predicate/index/CachedPostingListCounterTest.java index 31777959704..13a15cab52a 100644 --- a/predicate-search/src/test/java/com/yahoo/search/predicate/index/CachedPostingListCounterTest.java +++ b/predicate-search/src/test/java/com/yahoo/search/predicate/index/CachedPostingListCounterTest.java @@ -1,7 +1,7 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.search.predicate.index; -import org.apache.commons.lang.ArrayUtils; +import com.google.common.primitives.Ints; import org.eclipse.collections.impl.map.mutable.primitive.ObjectIntHashMap; import org.junit.Test; @@ -109,7 +109,7 @@ public class CachedPostingListCounterTest { private static PostingList postingList(Integer... docIds) { PostingList postingList = mock(PostingList.class); - when(postingList.getDocIds()).thenReturn(ArrayUtils.toPrimitive(docIds)); + when(postingList.getDocIds()).thenReturn(Ints.toArray(Arrays.asList((docIds)))); return postingList; } |