diff --git a/kotlin/tests/unittests/com/google/idea/blaze/kotlin/sync/importer/KotlinSyncAugmenterTest.java b/kotlin/tests/unittests/com/google/idea/blaze/kotlin/sync/importer/KotlinSyncAugmenterTest.java index ffe6f32a4eb..81478dce17a 100644 --- a/kotlin/tests/unittests/com/google/idea/blaze/kotlin/sync/importer/KotlinSyncAugmenterTest.java +++ b/kotlin/tests/unittests/com/google/idea/blaze/kotlin/sync/importer/KotlinSyncAugmenterTest.java @@ -49,6 +49,9 @@ import com.google.idea.common.experiments.MockExperimentService; import com.intellij.openapi.extensions.impl.ExtensionPointImpl; import java.util.ArrayList; + +import kotlin.sequences.Sequence; +import kotlin.sequences.SequencesKt; import org.jetbrains.annotations.NotNull; import org.junit.Test; import org.junit.runner.RunWith; @@ -123,7 +126,7 @@ public void testAddJarsForSourceTarget_attchClassJarForKotlinTarget() { .build(); ArrayList genJars = new ArrayList<>(); - for (BlazeJavaSyncAugmenter augmenter : augmenters) { + for (BlazeJavaSyncAugmenter augmenter : toIterable(augmenters)) { // #api233 - in 2024.1 ExtensionPointImpl implements Sequenec instead of Iterable augmenter.addJarsForSourceTarget( workspaceLanguageSettings, projectViewSet, target, new ArrayList<>(), genJars); } @@ -166,7 +169,8 @@ public void testAddJarsForSourceTarget_noExtraGenJarListForJavaTarget() { .build(); ArrayList genJars = new ArrayList<>(); - for (BlazeJavaSyncAugmenter augmenter : augmenters) { + for (BlazeJavaSyncAugmenter augmenter : toIterable(augmenters)) { // #api233 - in 2024.1 ExtensionPointImpl implements Sequence instead of Iterable + augmenter.addJarsForSourceTarget( workspaceLanguageSettings, projectViewSet, target, new ArrayList<>(), genJars); } @@ -184,4 +188,12 @@ private static ArtifactLocation gen(String relativePath) { private static ArtifactLocation source(String relativePath) { return ArtifactLocation.builder().setRelativePath(relativePath).setIsSource(true).build(); } + + private static Iterable toIterable(Iterable iterable) { + return iterable; + } + + private static Iterable toIterable(Sequence sequence) { + return SequencesKt.asIterable(sequence); + } }