aboutsummaryrefslogtreecommitdiff
path: root/plugins/javadoc
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/javadoc')
-rw-r--r--plugins/javadoc/src/main/kotlin/javadoc/pages/JavadocPageNodes.kt6
1 files changed, 3 insertions, 3 deletions
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() {