Skip to content

Commit

Permalink
Fixing compilation after apache#13119 backport
Browse files Browse the repository at this point in the history
  • Loading branch information
benwtrent committed Feb 22, 2024
1 parent b2b5e96 commit e5058e7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
package org.apache.lucene.codecs.lucene94;

import java.util.Arrays;
import java.util.stream.Collectors;
import org.apache.lucene.codecs.Codec;
import org.apache.lucene.index.VectorSimilarityFunction;
import org.apache.lucene.tests.index.BaseFieldInfoFormatTestCase;
Expand All @@ -33,7 +34,8 @@ protected Codec getCodec() {
public void testVectorSimilarityFuncs() {
// This does not necessarily have to be all similarity functions, but
// differences should be considered carefully.
var expectedValues = Arrays.stream(VectorSimilarityFunction.values()).toList();
var expectedValues =
Arrays.stream(VectorSimilarityFunction.values()).collect(Collectors.toList());

assertEquals(Lucene94FieldInfosFormat.SIMILARITY_FUNCTIONS, expectedValues);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
import org.apache.lucene.codecs.Codec;
import org.apache.lucene.codecs.FilterCodec;
import org.apache.lucene.codecs.KnnVectorsFormat;
Expand Down Expand Up @@ -195,7 +196,8 @@ public void testLimits() {
public void testVectorSimilarityFuncs() {
// This does not necessarily have to be all similarity functions, but
// differences should be considered carefully.
var expectedValues = Arrays.stream(VectorSimilarityFunction.values()).toList();
var expectedValues =
Arrays.stream(VectorSimilarityFunction.values()).collect(Collectors.toList());
assertEquals(Lucene99HnswVectorsReader.SIMILARITY_FUNCTIONS, expectedValues);
}
}

0 comments on commit e5058e7

Please sign in to comment.