From 618d31e309e065b0239e19d2f7fa36b2e891c769 Mon Sep 17 00:00:00 2001 From: Katarzyna Marek Date: Thu, 11 Apr 2024 15:03:35 +0200 Subject: [PATCH] tests: filter out `java.lang.classfile` for JDK 22 --- tests/cross/src/main/scala/tests/BaseCompletionSuite.scala | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/cross/src/main/scala/tests/BaseCompletionSuite.scala b/tests/cross/src/main/scala/tests/BaseCompletionSuite.scala index 6f8fecd0bc8..1ec486df5c9 100644 --- a/tests/cross/src/main/scala/tests/BaseCompletionSuite.scala +++ b/tests/cross/src/main/scala/tests/BaseCompletionSuite.scala @@ -35,6 +35,7 @@ abstract class BaseCompletionSuite extends BasePCSuite { result } + // NOTE: this filters out things from `java.lang.classfile` which was added in JDK 22 private def getItems( original: String, filename: String = "A.scala" @@ -49,6 +50,7 @@ abstract class BaseCompletionSuite extends BasePCSuite { ) ) result.getItems.asScala + .filterNot(item => item.getLabel().contains("- java.lang.classfile")) .sortBy(item => Option(item.getSortText).getOrElse(item.getLabel())) .toSeq }