aboutsummaryrefslogtreecommitdiff
path: root/core/src/main/kotlin
diff options
context:
space:
mode:
authorKamil Doległo <9080183+kamildoleglo@users.noreply.github.com>2021-04-06 15:34:39 +0200
committerGitHub <noreply@github.com>2021-04-06 15:34:39 +0200
commit6b2e9382a298045c1d3c39bdb3c33cdc0eebf38d (patch)
tree978d2cac1d7cd91f322fff2da8186797aadde5b9 /core/src/main/kotlin
parent6756bad5e9d5ebd996275e17bc3ea4f07aea54f4 (diff)
downloaddokka-6b2e9382a298045c1d3c39bdb3c33cdc0eebf38d.tar.gz
dokka-6b2e9382a298045c1d3c39bdb3c33cdc0eebf38d.tar.bz2
dokka-6b2e9382a298045c1d3c39bdb3c33cdc0eebf38d.zip
Fix some compiler warnings (#1812)
Diffstat (limited to 'core/src/main/kotlin')
-rw-r--r--core/src/main/kotlin/DokkaBootstrapImpl.kt10
-rw-r--r--core/src/main/kotlin/pages/PageNodes.kt2
-rw-r--r--core/src/main/kotlin/plugability/DokkaJavaPlugin.kt8
3 files changed, 10 insertions, 10 deletions
diff --git a/core/src/main/kotlin/DokkaBootstrapImpl.kt b/core/src/main/kotlin/DokkaBootstrapImpl.kt
index 6d6d8698..67dee9ae 100644
--- a/core/src/main/kotlin/DokkaBootstrapImpl.kt
+++ b/core/src/main/kotlin/DokkaBootstrapImpl.kt
@@ -9,18 +9,18 @@ import java.util.function.BiConsumer
fun parsePerPackageOptions(args: List<String>): List<PackageOptions> = args.map { it.split(",") }.map {
val matchingRegex = it.first()
- val args = it.subList(1, it.size)
+ val options = it.subList(1, it.size)
- val deprecated = args.find { it.endsWith("skipDeprecated") }?.startsWith("+")
+ val deprecated = options.find { it.endsWith("skipDeprecated") }?.startsWith("+")
?: DokkaDefaults.skipDeprecated
- val reportUndocumented = args.find { it.endsWith("reportUndocumented") }?.startsWith("+")
+ val reportUndocumented = options.find { it.endsWith("reportUndocumented") }?.startsWith("+")
?: DokkaDefaults.reportUndocumented
- val privateApi = args.find { it.endsWith("includeNonPublic") }?.startsWith("+")
+ val privateApi = options.find { it.endsWith("includeNonPublic") }?.startsWith("+")
?: DokkaDefaults.includeNonPublic
- val suppress = args.find { it.endsWith("suppress") }?.startsWith("+")
+ val suppress = options.find { it.endsWith("suppress") }?.startsWith("+")
?: DokkaDefaults.suppress
PackageOptionsImpl(
diff --git a/core/src/main/kotlin/pages/PageNodes.kt b/core/src/main/kotlin/pages/PageNodes.kt
index 83468671..9fc4d6e8 100644
--- a/core/src/main/kotlin/pages/PageNodes.kt
+++ b/core/src/main/kotlin/pages/PageNodes.kt
@@ -142,7 +142,7 @@ class MemberPageNode(
override val embeddedResources: List<String> = listOf()
) : MemberPage {
override fun modified(name: String, children: List<PageNode>): MemberPageNode =
- modified(name = name, content = this.content, children = children) as MemberPageNode
+ modified(name = name, content = this.content, children = children)
override fun modified(
name: String,
diff --git a/core/src/main/kotlin/plugability/DokkaJavaPlugin.kt b/core/src/main/kotlin/plugability/DokkaJavaPlugin.kt
index 1d8ea8aa..4c621703 100644
--- a/core/src/main/kotlin/plugability/DokkaJavaPlugin.kt
+++ b/core/src/main/kotlin/plugability/DokkaJavaPlugin.kt
@@ -28,8 +28,8 @@ data class ExtensionBuilder<T: Any> internal constructor(
private val name: String,
private val ext: ExtensionPoint<T>,
private val action: LazyEvaluated<T>,
- private val before: List<out Extension<*, *, *>>,
- private val after: List<out Extension<*, *, *>>,
+ private val before: List<Extension<*, *, *>>,
+ private val after: List<Extension<*, *, *>>,
private val override: OverrideKind = OverrideKind.None,
private val conditions: List<(DokkaConfiguration) -> Boolean>
){
@@ -62,11 +62,11 @@ data class ExtensionBuilder<T: Any> internal constructor(
abstract class DokkaJavaPlugin: DokkaPlugin() {
- fun <T: DokkaPlugin> plugin(clazz: Class<T>): T? =
+ fun <T: DokkaPlugin> plugin(clazz: Class<T>): T =
context?.plugin(clazz.kotlin) ?: throwIllegalQuery()
fun <T: Any> extend(func: (ExtensionBuilderStart) -> ExtensionBuilder<T>): Lazy<Extension<T, *, *>> =
lazy { func(ExtensionBuilderStart()).build() }.also { unsafeInstall(it) }
-} \ No newline at end of file
+}