From 459a0005824de412ff7d4472c1eb4d6fb7c2a7cc Mon Sep 17 00:00:00 2001 From: Marcin Aman Date: Fri, 27 Aug 2021 13:45:27 +0200 Subject: Restore language level to 1.4 --- .../test/kotlin/content/annotations/ContentForAnnotationsTest.kt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'plugins/base/src/test/kotlin') diff --git a/plugins/base/src/test/kotlin/content/annotations/ContentForAnnotationsTest.kt b/plugins/base/src/test/kotlin/content/annotations/ContentForAnnotationsTest.kt index 78934191..5c78e885 100644 --- a/plugins/base/src/test/kotlin/content/annotations/ContentForAnnotationsTest.kt +++ b/plugins/base/src/test/kotlin/content/annotations/ContentForAnnotationsTest.kt @@ -9,6 +9,7 @@ import org.jetbrains.dokka.pages.ContentPage import org.jetbrains.dokka.pages.ContentText import org.jetbrains.dokka.pages.MemberPageNode import org.jetbrains.dokka.pages.PackagePageNode +import org.jetbrains.kotlin.util.firstNotNullResult import org.junit.jupiter.api.Test import utils.ParamAttributes import utils.assertNotNull @@ -221,8 +222,8 @@ class ContentForAnnotationsTest : BaseAbstractTest() { mustBeDocumented = false )) val property = modules.flatMap { it.packages }.flatMap { it.properties }.first() - val annotation = property.extra?.get(Annotations)?.let { - it.directAnnotations.entries.firstNotNullOfOrNull { (_, annotations): Map.Entry> -> annotations.firstOrNull() } + val annotation = property.extra[Annotations]?.let { + it.directAnnotations.entries.firstNotNullResult { (_, annotations): Map.Entry> -> annotations.firstOrNull() } } val annotationParams = annotation?.params ?: emptyMap() @@ -283,10 +284,10 @@ class ContentForAnnotationsTest : BaseAbstractTest() { val property = modules.flatMap { it.packages }.flatMap { it.properties }.first() val getterAnnotation = property.getter?.extra?.get(Annotations)?.let { - it.directAnnotations.entries.firstNotNullOfOrNull { (_, annotations) -> annotations.firstOrNull() } + it.directAnnotations.entries.firstNotNullResult { (_, annotations) -> annotations.firstOrNull() } } val setterAnnotation = property.getter?.extra?.get(Annotations)?.let { - it.directAnnotations.entries.firstNotNullOfOrNull { (_, annotations) -> annotations.firstOrNull() } + it.directAnnotations.entries.firstNotNullResult { (_, annotations) -> annotations.firstOrNull() } } assertEquals(expectedAnnotation("xd"), getterAnnotation) -- cgit