aboutsummaryrefslogtreecommitdiff
path: root/plugins/kotlin-as-java/src/main/kotlin
diff options
context:
space:
mode:
authorMarcin Aman <marcin.aman@gmail.com>2021-08-26 12:15:22 +0200
committerMarcin Aman <marcin.aman@gmail.com>2021-08-26 12:15:22 +0200
commit622d59822e709438802b72d82afef025b43dd564 (patch)
tree016df910626187ba3cfef4aa4af3105111085330 /plugins/kotlin-as-java/src/main/kotlin
parenta3997262b7c7382549cd7f3b50dfd9cb63b277b0 (diff)
downloaddokka-622d59822e709438802b72d82afef025b43dd564.tar.gz
dokka-622d59822e709438802b72d82afef025b43dd564.tar.bz2
dokka-622d59822e709438802b72d82afef025b43dd564.zip
Bump compiler to 1.5.30, language level to 1.5
Diffstat (limited to 'plugins/kotlin-as-java/src/main/kotlin')
-rw-r--r--plugins/kotlin-as-java/src/main/kotlin/jvmField.kt3
-rw-r--r--plugins/kotlin-as-java/src/main/kotlin/jvmName.kt5
2 files changed, 3 insertions, 5 deletions
diff --git a/plugins/kotlin-as-java/src/main/kotlin/jvmField.kt b/plugins/kotlin-as-java/src/main/kotlin/jvmField.kt
index 9a66eb27..f54f844c 100644
--- a/plugins/kotlin-as-java/src/main/kotlin/jvmField.kt
+++ b/plugins/kotlin-as-java/src/main/kotlin/jvmField.kt
@@ -3,10 +3,9 @@ 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.utils.addToStdlib.firstNotNullResult
internal fun WithExtraProperties<out Documentable>.jvmField(): Annotations.Annotation? =
- extra[Annotations]?.directAnnotations?.entries?.firstNotNullResult { (_, annotations) -> annotations.jvmFieldAnnotation() }
+ extra[Annotations]?.directAnnotations?.entries?.firstNotNullOfOrNull { (_, 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
diff --git a/plugins/kotlin-as-java/src/main/kotlin/jvmName.kt b/plugins/kotlin-as-java/src/main/kotlin/jvmName.kt
index c81210d6..53f3430b 100644
--- a/plugins/kotlin-as-java/src/main/kotlin/jvmName.kt
+++ b/plugins/kotlin-as-java/src/main/kotlin/jvmName.kt
@@ -5,13 +5,12 @@ import org.jetbrains.dokka.model.Documentable
import org.jetbrains.dokka.model.StringValue
import org.jetbrains.dokka.model.isJvmName
import org.jetbrains.dokka.model.properties.WithExtraProperties
-import org.jetbrains.kotlin.utils.addToStdlib.firstNotNullResult
internal fun WithExtraProperties<out Documentable>.directlyAnnotatedJvmName(): Annotations.Annotation? =
- extra[Annotations]?.directAnnotations?.entries?.firstNotNullResult { (_, annotations) -> annotations.jvmNameAnnotation() }
+ extra[Annotations]?.directAnnotations?.entries?.firstNotNullOfOrNull { (_, annotations)-> annotations.jvmNameAnnotation() }
internal fun WithExtraProperties<out Documentable>.fileLevelJvmName(): Annotations.Annotation? =
- extra[Annotations]?.fileLevelAnnotations?.entries?.firstNotNullResult { (_, annotations) -> annotations.jvmNameAnnotation() }
+ extra[Annotations]?.fileLevelAnnotations?.entries?.firstNotNullOfOrNull { (_, annotations) -> annotations.jvmNameAnnotation() }
internal fun List<Annotations.Annotation>.jvmNameAnnotation(): Annotations.Annotation? =
firstOrNull { it.isJvmName() }