From e5058e73bafd3cc2f1eb965b05602dab77841464 Mon Sep 17 00:00:00 2001 From: Benjamin Trent <4357155+benwtrent@users.noreply.github.com> Date: Thu, 22 Feb 2024 15:24:37 -0500 Subject: [PATCH] Fixing compilation after #13119 backport --- .../lucene/codecs/lucene94/TestLucene94FieldInfosFormat.java | 4 +++- .../lucene99/TestLucene99HnswQuantizedVectorsFormat.java | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lucene/core/src/test/org/apache/lucene/codecs/lucene94/TestLucene94FieldInfosFormat.java b/lucene/core/src/test/org/apache/lucene/codecs/lucene94/TestLucene94FieldInfosFormat.java index c69eeadf5e69..1751159c0cc3 100644 --- a/lucene/core/src/test/org/apache/lucene/codecs/lucene94/TestLucene94FieldInfosFormat.java +++ b/lucene/core/src/test/org/apache/lucene/codecs/lucene94/TestLucene94FieldInfosFormat.java @@ -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; @@ -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); } diff --git a/lucene/core/src/test/org/apache/lucene/codecs/lucene99/TestLucene99HnswQuantizedVectorsFormat.java b/lucene/core/src/test/org/apache/lucene/codecs/lucene99/TestLucene99HnswQuantizedVectorsFormat.java index 439c93ea5262..67faf8c67399 100644 --- a/lucene/core/src/test/org/apache/lucene/codecs/lucene99/TestLucene99HnswQuantizedVectorsFormat.java +++ b/lucene/core/src/test/org/apache/lucene/codecs/lucene99/TestLucene99HnswQuantizedVectorsFormat.java @@ -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; @@ -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); } }