aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/base/src/test/kotlin/basic/DokkaBasicTests.kt3
-rw-r--r--plugins/javadoc/src/main/kotlin/javadoc/pages/JavadocPageNodes.kt6
2 files changed, 4 insertions, 5 deletions
diff --git a/plugins/base/src/test/kotlin/basic/DokkaBasicTests.kt b/plugins/base/src/test/kotlin/basic/DokkaBasicTests.kt
index c9f4b156..5cc17bf3 100644
--- a/plugins/base/src/test/kotlin/basic/DokkaBasicTests.kt
+++ b/plugins/base/src/test/kotlin/basic/DokkaBasicTests.kt
@@ -32,8 +32,7 @@ class DokkaBasicTests : AbstractCoreTest() {
) {
pagesGenerationStage = {
val root = it as ModulePageNode
- println(root.dri)
- assertTrue(root.getClasslikeToMemberMap().filterKeys { root.name == "Test" }.entries.firstOrNull()?.value?.size == 2)
+ assertTrue(root.getClasslikeToMemberMap().filterKeys { it.name == "Test" }.entries.firstOrNull()?.value?.size == 2)
}
}
}
diff --git a/plugins/javadoc/src/main/kotlin/javadoc/pages/JavadocPageNodes.kt b/plugins/javadoc/src/main/kotlin/javadoc/pages/JavadocPageNodes.kt
index a1bffdc2..118bc4d3 100644
--- a/plugins/javadoc/src/main/kotlin/javadoc/pages/JavadocPageNodes.kt
+++ b/plugins/javadoc/src/main/kotlin/javadoc/pages/JavadocPageNodes.kt
@@ -239,7 +239,7 @@ class TreeViewPage(
else {
listOf(node.copy(children = node.children.flatMap (::classTreeRec)))
}
- fun classTree(node: InheritanceNode) = classTreeRec(node).single()
+ fun classTree(node: InheritanceNode) = classTreeRec(node).singleOrNull()
fun interfaceTreeRec(node: InheritanceNode): List<InheritanceNode> = if (node.isInterface) {
listOf(node.copy(children = node.children.filter { it.isInterface }))
@@ -248,7 +248,7 @@ class TreeViewPage(
node.children.flatMap(::interfaceTreeRec)
}
- fun interfaceTree(node: InheritanceNode) = interfaceTreeRec(node).first() // TODO.single()
+ fun interfaceTree(node: InheritanceNode) = interfaceTreeRec(node).firstOrNull() // TODO.single()
fun gatherPsiClasses(psi: PsiClass): List<Pair<PsiClass, List<PsiClass>>> = psi.supers.toList().let { l ->
listOf(psi to l) + l.flatMap { gatherPsiClasses(it) }
@@ -303,7 +303,7 @@ class TreeViewPage(
collect(it.value.dri)
}
- return rootNodes.let { Pair(it.map(::classTree), it.map(::interfaceTree)) }
+ return rootNodes.let { Pair(it.mapNotNull(::classTree), it.mapNotNull(::interfaceTree)) }
}
private fun generateInterfaceGraph() {