aboutsummaryrefslogtreecommitdiff
path: root/plugins/javadoc/src
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/javadoc/src')
-rw-r--r--plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/JavadocPageCreator.kt2
-rw-r--r--plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/pages/JavadocPageNodes.kt6
2 files changed, 6 insertions, 2 deletions
diff --git a/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/JavadocPageCreator.kt b/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/JavadocPageCreator.kt
index 05de8fa1..2fb00335 100644
--- a/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/JavadocPageCreator.kt
+++ b/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/JavadocPageCreator.kt
@@ -84,7 +84,7 @@ open class JavadocPageCreator(
leafList(setOf(m.dri),
ContentKind.Packages, JavadocList(
"Packages", "Package",
- m.packages.sortedBy { it.name }.map { p ->
+ m.packages.sortedBy { it.packageName }.map { p ->
RowJavadocListEntry(
LinkJavadocListEntry(p.name, setOf(p.dri), JavadocContentKind.PackageSummary, sourceSets),
p.brief()
diff --git a/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/pages/JavadocPageNodes.kt b/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/pages/JavadocPageNodes.kt
index 3875c307..2f26ea79 100644
--- a/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/pages/JavadocPageNodes.kt
+++ b/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/pages/JavadocPageNodes.kt
@@ -74,6 +74,10 @@ class JavadocPackagePageNode(
NavigableJavadocNode,
PackagePage {
+ init {
+ require(name.isNotBlank()) { "Empty name is not supported " }
+ }
+
override fun getAllNavigables(): List<NavigableJavadocNode> =
children.filterIsInstance<NavigableJavadocNode>().flatMap {
if (it is WithNavigable) it.getAllNavigables()
@@ -568,4 +572,4 @@ private fun Documentable.kind(): String? =
is DObject -> "object"
is DInterface -> "interface"
else -> null
- } \ No newline at end of file
+ }