diff options
Diffstat (limited to 'plugins')
3 files changed, 3 insertions, 3 deletions
diff --git a/plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt b/plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt index 0cd99f08..3dc2385a 100644 --- a/plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt +++ b/plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt @@ -62,7 +62,6 @@ import org.jetbrains.kotlin.resolve.source.PsiSourceFile import org.jetbrains.kotlin.types.* import org.jetbrains.kotlin.types.typeUtil.immediateSupertypes import org.jetbrains.kotlin.types.typeUtil.isAnyOrNullableAny -import org.jetbrains.kotlin.util.firstNotNullResult import org.jetbrains.kotlin.utils.addToStdlib.firstIsInstanceOrNull import org.jetbrains.kotlin.utils.addToStdlib.safeAs import java.nio.file.Paths diff --git a/plugins/base/src/test/kotlin/content/annotations/ContentForAnnotationsTest.kt b/plugins/base/src/test/kotlin/content/annotations/ContentForAnnotationsTest.kt index 5c78e885..f7f7eb66 100644 --- a/plugins/base/src/test/kotlin/content/annotations/ContentForAnnotationsTest.kt +++ b/plugins/base/src/test/kotlin/content/annotations/ContentForAnnotationsTest.kt @@ -223,7 +223,7 @@ class ContentForAnnotationsTest : BaseAbstractTest() { )) val property = modules.flatMap { it.packages }.flatMap { it.properties }.first() val annotation = property.extra[Annotations]?.let { - it.directAnnotations.entries.firstNotNullResult { (_, annotations): Map.Entry<DokkaConfiguration.DokkaSourceSet, List<Annotations.Annotation>> -> annotations.firstOrNull() } + it.directAnnotations.entries.firstNotNullResult { (_, annotations) -> annotations.firstOrNull() } } val annotationParams = annotation?.params ?: emptyMap() diff --git a/plugins/kotlin-as-java/src/main/kotlin/jvmField.kt b/plugins/kotlin-as-java/src/main/kotlin/jvmField.kt index 3e57f4d0..b421bd3d 100644 --- a/plugins/kotlin-as-java/src/main/kotlin/jvmField.kt +++ b/plugins/kotlin-as-java/src/main/kotlin/jvmField.kt @@ -3,9 +3,10 @@ package org.jetbrains.dokka.kotlinAsJava import org.jetbrains.dokka.model.Annotations import org.jetbrains.dokka.model.Documentable import org.jetbrains.dokka.model.properties.WithExtraProperties +import org.jetbrains.kotlin.util.firstNotNullResult internal fun WithExtraProperties<out Documentable>.jvmField(): Annotations.Annotation? = - extra[Annotations]?.directAnnotations?.entries?.mapNotNull { (_, annotations) -> annotations.jvmFieldAnnotation() }?.firstOrNull() + extra[Annotations]?.directAnnotations?.entries?.firstNotNullResult { (_, annotations) -> annotations.jvmFieldAnnotation() } internal fun List<Annotations.Annotation>.jvmFieldAnnotation(): Annotations.Annotation? = firstOrNull { it.dri.packageName == "kotlin.jvm" && it.dri.classNames == "JvmField" }
\ No newline at end of file |