diff options
author | Marcin Aman <marcin.aman@gmail.com> | 2021-08-27 17:07:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-27 17:07:18 +0200 |
commit | 9518bf22eb14076c53e8d1b3bc45fe8b07e10da5 (patch) | |
tree | 6167d4b1b1d8ba565ac2ab316f0108ad592a0e26 /plugins/base | |
parent | a3997262b7c7382549cd7f3b50dfd9cb63b277b0 (diff) | |
parent | fb6822793252cb2957ae0f0c2ed36aafebcf12f4 (diff) | |
download | dokka-9518bf22eb14076c53e8d1b3bc45fe8b07e10da5.tar.gz dokka-9518bf22eb14076c53e8d1b3bc45fe8b07e10da5.tar.bz2 dokka-9518bf22eb14076c53e8d1b3bc45fe8b07e10da5.zip |
Merge pull request #2095 from Kotlin/bump-compiler-1.5.30
Bump compiler to 1.5.30
Diffstat (limited to 'plugins/base')
4 files changed, 7 insertions, 6 deletions
diff --git a/plugins/base/src/main/kotlin/transformers/documentables/DefaultDocumentableMerger.kt b/plugins/base/src/main/kotlin/transformers/documentables/DefaultDocumentableMerger.kt index 94e27424..61a7a6a2 100644 --- a/plugins/base/src/main/kotlin/transformers/documentables/DefaultDocumentableMerger.kt +++ b/plugins/base/src/main/kotlin/transformers/documentables/DefaultDocumentableMerger.kt @@ -7,7 +7,7 @@ import org.jetbrains.dokka.model.properties.MergeStrategy import org.jetbrains.dokka.model.properties.mergeExtras import org.jetbrains.dokka.plugability.DokkaContext import org.jetbrains.dokka.transformers.documentation.DocumentableMerger -import org.jetbrains.kotlin.utils.addToStdlib.firstNotNullResult +import org.jetbrains.kotlin.util.firstNotNullResult internal class DefaultDocumentableMerger(val context: DokkaContext) : DocumentableMerger { private val dependencyInfo = context.getDependencyInfo() diff --git a/plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt b/plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt index d986056c..3dc2385a 100644 --- a/plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt +++ b/plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt @@ -63,7 +63,6 @@ import org.jetbrains.kotlin.types.* import org.jetbrains.kotlin.types.typeUtil.immediateSupertypes import org.jetbrains.kotlin.types.typeUtil.isAnyOrNullableAny import org.jetbrains.kotlin.utils.addToStdlib.firstIsInstanceOrNull -import org.jetbrains.kotlin.utils.addToStdlib.firstNotNullResult import org.jetbrains.kotlin.utils.addToStdlib.safeAs import java.nio.file.Paths import org.jetbrains.kotlin.resolve.constants.AnnotationValue as ConstantsAnnotationValue @@ -892,7 +891,8 @@ private class DokkaDescriptorVisitor( private fun DeclarationDescriptor.getJavaDocs() = (this as? CallableDescriptor) ?.overriddenDescriptors ?.mapNotNull { it.findPsi() as? PsiNamedElement } - ?.firstNotNullResult { javadocParser.parseDocumentation(it) } + ?.firstOrNull() + ?.let { javadocParser.parseDocumentation(it) } private suspend fun ClassDescriptor.companion(dri: DRIWithPlatformInfo): DObject? = companionObjectDescriptor?.let { objectDescriptor(it, dri) diff --git a/plugins/base/src/main/kotlin/translators/documentables/briefFromContentNodes.kt b/plugins/base/src/main/kotlin/translators/documentables/briefFromContentNodes.kt index 81ddb6ed..bd54eedd 100644 --- a/plugins/base/src/main/kotlin/translators/documentables/briefFromContentNodes.kt +++ b/plugins/base/src/main/kotlin/translators/documentables/briefFromContentNodes.kt @@ -3,7 +3,7 @@ package org.jetbrains.dokka.base.translators.documentables import org.jetbrains.dokka.model.doc.* import org.jetbrains.dokka.model.withDescendants import org.jetbrains.dokka.pages.* -import org.jetbrains.kotlin.utils.addToStdlib.firstNotNullResult +import org.jetbrains.kotlin.util.firstNotNullResult import org.jetbrains.kotlin.utils.addToStdlib.safeAs fun firstParagraphBrief(docTag: DocTag): DocTag? = diff --git a/plugins/base/src/test/kotlin/content/annotations/ContentForAnnotationsTest.kt b/plugins/base/src/test/kotlin/content/annotations/ContentForAnnotationsTest.kt index c48ddedf..f7f7eb66 100644 --- a/plugins/base/src/test/kotlin/content/annotations/ContentForAnnotationsTest.kt +++ b/plugins/base/src/test/kotlin/content/annotations/ContentForAnnotationsTest.kt @@ -1,6 +1,7 @@ package content.annotations import matchers.content.* +import org.jetbrains.dokka.DokkaConfiguration import org.jetbrains.dokka.base.testApi.testRunner.BaseAbstractTest import org.jetbrains.dokka.links.DRI import org.jetbrains.dokka.model.* @@ -8,7 +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.utils.addToStdlib.firstNotNullResult +import org.jetbrains.kotlin.util.firstNotNullResult import org.junit.jupiter.api.Test import utils.ParamAttributes import utils.assertNotNull @@ -221,7 +222,7 @@ class ContentForAnnotationsTest : BaseAbstractTest() { mustBeDocumented = false )) val property = modules.flatMap { it.packages }.flatMap { it.properties }.first() - val annotation = property.extra?.get(Annotations)?.let { + val annotation = property.extra[Annotations]?.let { it.directAnnotations.entries.firstNotNullResult { (_, annotations) -> annotations.firstOrNull() } } val annotationParams = annotation?.params ?: emptyMap() |