diff options
-rw-r--r-- | src/Formats/FormatService.kt | 2 | ||||
-rw-r--r-- | src/Formats/HtmlFormatService.kt | 12 | ||||
-rw-r--r-- | src/Formats/JekyllFormatService.kt | 2 | ||||
-rw-r--r-- | src/Formats/KotlinWebsiteFormatService.kt | 6 | ||||
-rw-r--r-- | src/Formats/OutlineService.kt | 2 | ||||
-rw-r--r-- | src/Formats/StructuredFormatService.kt | 10 | ||||
-rw-r--r-- | src/Java/JavaDocumentationBuilder.kt | 12 | ||||
-rw-r--r-- | src/Kotlin/ContentBuilder.kt | 4 | ||||
-rw-r--r-- | src/Kotlin/DocumentationBuilder.kt | 16 | ||||
-rw-r--r-- | src/Kotlin/KotlinLanguageService.kt | 2 | ||||
-rw-r--r-- | src/Languages/JavaLanguageService.kt | 16 | ||||
-rw-r--r-- | src/Markdown/MarkdownProcessor.kt | 2 | ||||
-rw-r--r-- | src/Model/PackageDocs.kt | 2 | ||||
-rw-r--r-- | src/Model/SourceLinks.kt | 2 | ||||
-rw-r--r-- | src/Utilities/Path.kt | 5 | ||||
-rw-r--r-- | src/main.kt | 2 | ||||
-rw-r--r-- | test/src/model/ClassTest.kt | 16 | ||||
-rw-r--r-- | test/src/model/JavaTest.kt | 14 |
18 files changed, 61 insertions, 66 deletions
diff --git a/src/Formats/FormatService.kt b/src/Formats/FormatService.kt index 642fad04..7e66a6b7 100644 --- a/src/Formats/FormatService.kt +++ b/src/Formats/FormatService.kt @@ -17,4 +17,4 @@ public interface FormatService { } /** Format content to [String] using specified [location] */ -fun FormatService.format(location: Location, nodes: Iterable<DocumentationNode>): String = kotlin.StringBuilder { appendNodes(location, this, nodes) }.toString() +fun FormatService.format(location: Location, nodes: Iterable<DocumentationNode>): String = StringBuilder().apply { appendNodes(location, this, nodes) }.toString() diff --git a/src/Formats/HtmlFormatService.kt b/src/Formats/HtmlFormatService.kt index 78d3cff2..74b10255 100644 --- a/src/Formats/HtmlFormatService.kt +++ b/src/Formats/HtmlFormatService.kt @@ -112,13 +112,13 @@ public open class HtmlFormatService(locationService: LocationService, override fun appendNodes(location: Location, to: StringBuilder, nodes: Iterable<DocumentationNode>) { templateService.appendHeader(to, getPageTitle(nodes)) - super<StructuredFormatService>.appendNodes(location, to, nodes) + super.appendNodes(location, to, nodes) templateService.appendFooter(to) } override fun appendOutline(location: Location, to: StringBuilder, nodes: Iterable<DocumentationNode>) { templateService.appendHeader(to, "Module Contents") - super<OutlineFormatService>.appendOutline(location, to, nodes) + super.appendOutline(location, to, nodes) templateService.appendFooter(to) } @@ -144,16 +144,16 @@ public open class HtmlFormatService(locationService: LocationService, fun getPageTitle(nodes: Iterable<DocumentationNode>): String? { val breakdownByLocation = nodes.groupBy { node -> formatPageTitle(node) } - return breakdownByLocation.keySet().singleOrNull() + return breakdownByLocation.keys.singleOrNull() } fun formatPageTitle(node: DocumentationNode): String { val path = node.path - if (path.size() == 1) { + if (path.size == 1) { return path.first().name } - val qualifiedName = path.drop(1).map { it.name }.filter { it.length() > 0 }.join(".") - if (qualifiedName.length() == 0 && path.size() == 2) { + val qualifiedName = path.drop(1).map { it.name }.filter { it.length > 0 }.joinToString(".") + if (qualifiedName.length == 0 && path.size == 2) { return path.first().name + " / root package" } return path.first().name + " / " + qualifiedName diff --git a/src/Formats/JekyllFormatService.kt b/src/Formats/JekyllFormatService.kt index e4c3ccd5..98958293 100644 --- a/src/Formats/JekyllFormatService.kt +++ b/src/Formats/JekyllFormatService.kt @@ -9,7 +9,7 @@ public open class JekyllFormatService(locationService: LocationService, appendFrontMatter(nodes, to) to.appendln("---") to.appendln("") - super<MarkdownFormatService>.appendNodes(location, to, nodes) + super.appendNodes(location, to, nodes) } protected open fun appendFrontMatter(nodes: Iterable<DocumentationNode>, to: StringBuilder) { diff --git a/src/Formats/KotlinWebsiteFormatService.kt b/src/Formats/KotlinWebsiteFormatService.kt index 21fc9dae..3a9fc6cd 100644 --- a/src/Formats/KotlinWebsiteFormatService.kt +++ b/src/Formats/KotlinWebsiteFormatService.kt @@ -20,14 +20,14 @@ public class KotlinWebsiteFormatService(locationService: LocationService, return "" } - override public fun formatCode(code: String): String = if (code.length() > 0) "<code>$code</code>" else "" + override public fun formatCode(code: String): String = if (code.length > 0) "<code>$code</code>" else "" override fun formatStrikethrough(text: String): String = "<s>$text</s>" override fun appendAsSignature(to: StringBuilder, block: () -> Unit) { - val oldLength = to.length() + val oldLength = to.length block() - if (to.length() > oldLength) { + if (to.length > oldLength) { to.append("<br/>") // since we've used HTML to format the signature, add an HTML line break following it } } diff --git a/src/Formats/OutlineService.kt b/src/Formats/OutlineService.kt index 31128d6d..6626cf51 100644 --- a/src/Formats/OutlineService.kt +++ b/src/Formats/OutlineService.kt @@ -25,5 +25,5 @@ public interface OutlineFormatService { } fun formatOutline(location: Location, nodes: Iterable<DocumentationNode>): String = - StringBuilder { appendOutline(location, this, nodes) }.toString() + StringBuilder().apply { appendOutline(location, this, nodes) }.toString() } diff --git a/src/Formats/StructuredFormatService.kt b/src/Formats/StructuredFormatService.kt index 98277c9c..a9b058d1 100644 --- a/src/Formats/StructuredFormatService.kt +++ b/src/Formats/StructuredFormatService.kt @@ -46,11 +46,11 @@ public abstract class StructuredFormatService(locationService: LocationService, public abstract fun formatNonBreakingSpace(): String open fun formatText(location: Location, nodes: Iterable<ContentNode>, listKind: ListKind = ListKind.Unordered): String { - return nodes.map { formatText(location, it, listKind) }.join("") + return nodes.map { formatText(location, it, listKind) }.joinToString("") } open fun formatText(location: Location, content: ContentNode, listKind: ListKind = ListKind.Unordered): String { - return StringBuilder { + return StringBuilder().apply { when (content) { is ContentText -> append(formatText(content.text)) is ContentSymbol -> append(formatSymbol(content.text)) @@ -144,7 +144,7 @@ public abstract class StructuredFormatService(locationService: LocationService, appendLine(to) } node.content.getSectionsWithSubjects().forEach { - appendSectionWithSubject(it.getKey(), location, it.getValue(), to) + appendSectionWithSubject(it.key, location, it.value, to) } for (section in node.content.sections.filter { it.subjectName == null }) { @@ -238,7 +238,7 @@ public abstract class StructuredFormatService(locationService: LocationService, appendTableCell(to) { val breakdownBySummary = members.groupBy { formatText(location, it.summary) } for ((summary, items) in breakdownBySummary) { - val signatureTexts = items map { signature -> + val signatureTexts = items.map { signature -> val signatureText = languageService.render(signature, RenderMode.SUMMARY) if (signatureText is ContentBlock && signatureText.isEmpty()) { "" @@ -248,7 +248,7 @@ public abstract class StructuredFormatService(locationService: LocationService, formatText(location, signatureAsCode) } } - signatureTexts.subList(0, signatureTexts.size()-1).forEach { + signatureTexts.subList(0, signatureTexts.size -1).forEach { appendAsSignature(to) { appendLine(to, it) } diff --git a/src/Java/JavaDocumentationBuilder.kt b/src/Java/JavaDocumentationBuilder.kt index 1cd8d819..01ecb478 100644 --- a/src/Java/JavaDocumentationBuilder.kt +++ b/src/Java/JavaDocumentationBuilder.kt @@ -108,10 +108,7 @@ public class JavaDocumentationBuilder(private val options: DocumentationOptions, } private fun MutableContent.convertSeeTag(tag: PsiDocTag) { - val linkElement = tag.linkElement() - if (linkElement == null) { - return - } + val linkElement = tag.linkElement() ?: return val seeSection = findSectionByTag("See Also") ?: addSection("See Also", null) val linkSignature = resolveLink(linkElement) val text = ContentText(linkElement.text) @@ -192,7 +189,7 @@ public class JavaDocumentationBuilder(private val options: DocumentationOptions, is PsiField -> element.containingClass!!.qualifiedName + "#" + element.name is PsiMethod -> element.containingClass!!.qualifiedName + "#" + element.name + "(" + - element.parameterList.parameters.map { it.type.typeSignature() }.join(",") + ")" + element.parameterList.parameters.map { it.type.typeSignature() }.joinToString(",") + ")" else -> null } @@ -341,10 +338,7 @@ public class JavaDocumentationBuilder(private val options: DocumentationOptions, } fun DocumentationNode.appendModifiers(element: PsiModifierListOwner) { - val modifierList = element.modifierList - if (modifierList == null) { - return - } + val modifierList = element.modifierList ?: return PsiModifier.MODIFIERS.forEach { if (it != "static" && modifierList.hasExplicitModifier(it)) { appendTextNode(it, Kind.Modifier) diff --git a/src/Kotlin/ContentBuilder.kt b/src/Kotlin/ContentBuilder.kt index 4dfcec3b..c981eb42 100644 --- a/src/Kotlin/ContentBuilder.kt +++ b/src/Kotlin/ContentBuilder.kt @@ -165,9 +165,9 @@ fun DocumentationBuilder.functionBody(descriptor: DeclarationDescriptor, functio else -> psiElement.text } - val lines = text.trimEnd().split("\n".toRegex()).toTypedArray().filterNot { it.length() == 0 } + val lines = text.trimEnd().split("\n".toRegex()).toTypedArray().filterNot { it.length == 0 } val indent = lines.map { it.takeWhile { it.isWhitespace() }.count() }.min() ?: 0 - val finalText = lines.map { it.drop(indent) }.join("\n") + val finalText = lines.map { it.drop(indent) }.joinToString("\n") return ContentBlockCode("kotlin").let() { it.append(ContentText(finalText)); it } } diff --git a/src/Kotlin/DocumentationBuilder.kt b/src/Kotlin/DocumentationBuilder.kt index 3f3eea67..b1aef822 100644 --- a/src/Kotlin/DocumentationBuilder.kt +++ b/src/Kotlin/DocumentationBuilder.kt @@ -154,13 +154,13 @@ class DocumentationBuilder(val resolutionFacade: ResolutionFacade, if (extensionReceiver != null) { params.add(0, extensionReceiver.type) } - return "(" + params.map { it.signature() }.join() + ")" + return "(" + params.map { it.signature() }.joinToString() + ")" } fun KtType.signature(): String { val declarationDescriptor = constructor.declarationDescriptor ?: return "<null>" val typeName = DescriptorUtils.getFqName(declarationDescriptor).asString() - if (typeName == "Array" && arguments.size() == 1) { + if (typeName == "Array" && arguments.size == 1) { return "Array<" + arguments.first().type.signature() + ">" } return typeName @@ -243,7 +243,7 @@ class DocumentationBuilder(val resolutionFacade: ResolutionFacade, refGraph.register(descriptor.signature(), node) } - fun DocumentationNode<T>(descriptor: T, kind: Kind): DocumentationNode where T : DeclarationDescriptor, T : Named { + fun <T> DocumentationNode(descriptor: T, kind: Kind): DocumentationNode where T : DeclarationDescriptor, T : Named { val doc = parseDocumentation(descriptor) val node = DocumentationNode(descriptor.name.asString(), doc, kind).withModifiers(descriptor) return node @@ -267,7 +267,7 @@ class DocumentationBuilder(val resolutionFacade: ResolutionFacade, modality = Modality.FINAL } } - val modifier = modality.name().toLowerCase() + val modifier = modality.name.toLowerCase() appendTextNode(modifier, DocumentationNode.Kind.Modifier) } @@ -475,7 +475,7 @@ class DocumentationBuilder(val resolutionFacade: ResolutionFacade, if (getKind() != ClassKind.OBJECT && getKind() != ClassKind.ENUM_ENTRY) { node.appendInPageChildren(typeConstructor.parameters, DocumentationReference.Kind.Detail) val constructorsToDocument = if (getKind() == ClassKind.ENUM_CLASS) - constructors.filter { it.valueParameters.size() > 0 } + constructors.filter { it.valueParameters.size > 0 } else constructors node.appendChildren(constructorsToDocument, DocumentationReference.Kind.Member) @@ -571,7 +571,7 @@ class DocumentationBuilder(val resolutionFacade: ResolutionFacade, } fun FunctionDescriptor.getImplementedOperator(): String? { - var arity = valueParameters.size() + var arity = valueParameters.size if (containingDeclaration is ClassDescriptor) { arity++ } @@ -589,7 +589,7 @@ class DocumentationBuilder(val resolutionFacade: ResolutionFacade, else null if (token is KtSingleValueToken) { - return token.getValue() + return token.value } val name = name.asString() @@ -599,7 +599,7 @@ class DocumentationBuilder(val resolutionFacade: ResolutionFacade, if (arity >= 2 && (name == "get" || name == "set")) { return "[]" } - if (arity == 2 && name == "equals" && valueParameters.size() == 1 && + if (arity == 2 && name == "equals" && valueParameters.size == 1 && KotlinBuiltIns.isNullableAny(valueParameters.first().type)) { return "==" } diff --git a/src/Kotlin/KotlinLanguageService.kt b/src/Kotlin/KotlinLanguageService.kt index 6541e46c..12a0bcda 100644 --- a/src/Kotlin/KotlinLanguageService.kt +++ b/src/Kotlin/KotlinLanguageService.kt @@ -86,7 +86,7 @@ class KotlinLanguageService : LanguageService { typeArguments = typeArguments.drop(1) } symbol("(") - renderList(typeArguments.take(typeArguments.size() - 1), noWrap = true) { + renderList(typeArguments.take(typeArguments.size - 1), noWrap = true) { renderType(it) } symbol(")") diff --git a/src/Languages/JavaLanguageService.kt b/src/Languages/JavaLanguageService.kt index e491d1bd..bcd058b5 100644 --- a/src/Languages/JavaLanguageService.kt +++ b/src/Languages/JavaLanguageService.kt @@ -1,6 +1,6 @@ package org.jetbrains.dokka -import org.jetbrains.dokka.DocumentationNode.* +import org.jetbrains.dokka.DocumentationNode.Kind import org.jetbrains.dokka.LanguageService.RenderMode /** @@ -65,7 +65,7 @@ public class JavaLanguageService : LanguageService { return if (constraints.none()) node.name else { - node.name + " extends " + constraints.map { renderType(node) }.join() + node.name + " extends " + constraints.map { renderType(node) }.joinToString() } } @@ -74,11 +74,11 @@ public class JavaLanguageService : LanguageService { } private fun renderTypeParametersForNode(node: DocumentationNode): String { - return StringBuilder { + return StringBuilder().apply { val typeParameters = node.details(Kind.TypeParameter) if (typeParameters.any()) { append("<") - append(typeParameters.map { renderTypeParameter(it) }.join()) + append(typeParameters.map { renderTypeParameter(it) }.joinToString()) append("> ") } }.toString() @@ -88,11 +88,11 @@ public class JavaLanguageService : LanguageService { val modifiers = node.details(Kind.Modifier).map { renderModifier(it) }.filter { it != "" } if (modifiers.none()) return "" - return modifiers.join(" ", postfix = " ") + return modifiers.joinToString(" ", postfix = " ") } private fun renderClass(node: DocumentationNode): String { - return StringBuilder { + return StringBuilder().apply { when (node.kind) { Kind.Class -> append("class ") Kind.Interface -> append("interface ") @@ -108,7 +108,7 @@ public class JavaLanguageService : LanguageService { } private fun renderFunction(node: DocumentationNode): String { - return StringBuilder { + return StringBuilder().apply { when (node.kind) { Kind.Constructor -> append(node.owner?.name) Kind.Function -> { @@ -132,7 +132,7 @@ public class JavaLanguageService : LanguageService { } private fun renderProperty(node: DocumentationNode): String { - return StringBuilder { + return StringBuilder().apply { when (node.kind) { Kind.Property -> append("val ") else -> throw IllegalArgumentException("Node $node is not a property") diff --git a/src/Markdown/MarkdownProcessor.kt b/src/Markdown/MarkdownProcessor.kt index 62395bc1..99caddc4 100644 --- a/src/Markdown/MarkdownProcessor.kt +++ b/src/Markdown/MarkdownProcessor.kt @@ -13,7 +13,7 @@ class MarkdownNode(val node: ASTNode, val parent: MarkdownNode?, val markdown: S val text: String get() = markdown.substring(node.startOffset, node.endOffset) fun child(type: IElementType): MarkdownNode? = children.firstOrNull { it.type == type } - override fun toString(): String = StringBuilder { presentTo(this) }.toString() + override fun toString(): String = StringBuilder().apply { presentTo(this) }.toString() } fun MarkdownNode.visit(action: (MarkdownNode, () -> Unit) -> Unit) { diff --git a/src/Model/PackageDocs.kt b/src/Model/PackageDocs.kt index 68b4dcc1..99da327b 100644 --- a/src/Model/PackageDocs.kt +++ b/src/Model/PackageDocs.kt @@ -39,7 +39,7 @@ public class PackageDocs(val documentationBuilder: DocumentationBuilder?, return moduleContent } if (heading.startsWith("Package") || heading.startsWith("package")) { - return findOrCreatePackageContent(heading.substring("package".length()).trim()) + return findOrCreatePackageContent(heading.substring("package".length).trim()) } return findOrCreatePackageContent(heading) } diff --git a/src/Model/SourceLinks.kt b/src/Model/SourceLinks.kt index 52de586c..956bfe4b 100644 --- a/src/Model/SourceLinks.kt +++ b/src/Model/SourceLinks.kt @@ -15,7 +15,7 @@ fun DocumentationNode.appendSourceLink(psi: PsiElement?, sourceLinks: List<Sourc val absPath = File(path).absolutePath val linkDef = sourceLinks.firstOrNull { absPath.startsWith(it.path) } if (linkDef != null) { - var url = linkDef.url + path.substring(linkDef.path.length()) + var url = linkDef.url + path.substring(linkDef.path.length) if (linkDef.lineSuffix != null) { val line = target?.lineNumber() if (line != null) { diff --git a/src/Utilities/Path.kt b/src/Utilities/Path.kt index 973163a8..292b0eed 100644 --- a/src/Utilities/Path.kt +++ b/src/Utilities/Path.kt @@ -1,6 +1,7 @@ package org.jetbrains.dokka -import java.io.* +import java.io.File +import java.io.IOException fun File.getRelativePath(name: File): File { val parent = parentFile @@ -12,7 +13,7 @@ fun File.getRelativePath(name: File): File { val targetPath = name.canonicalPath; if (targetPath.startsWith(basePath)) { - return File(targetPath.substring(basePath.length())) + return File(targetPath.substring(basePath.length)) } else { return File(".." + File.separator + parent.getRelativePath(name)) } diff --git a/src/main.kt b/src/main.kt index 5cbfff1a..f2d2f8e2 100644 --- a/src/main.kt +++ b/src/main.kt @@ -143,7 +143,7 @@ class DokkaGenerator(val logger: DokkaLogger, logger.info("Module: ${moduleName}") logger.info("Output: ${File(outputDir).absolutePath}") - logger.info("Sources: ${environment.sources.join()}") + logger.info("Sources: ${environment.sources.joinToString()}") logger.info("Classpath: ${environment.classpath.joinToString()}") logger.info("Analysing sources and libraries... ") diff --git a/test/src/model/ClassTest.kt b/test/src/model/ClassTest.kt index 24503273..0e2323c1 100644 --- a/test/src/model/ClassTest.kt +++ b/test/src/model/ClassTest.kt @@ -222,11 +222,11 @@ public class ClassTest { verifyModel("test/data/classes/notOpenClass.kt") { model -> with(model.members.single().members.first { it.name == "D"}.members.first { it.name == "f" }) { val modifiers = details(DocumentationNode.Kind.Modifier) - assertEquals(2, modifiers.size()) + assertEquals(2, modifiers.size) assertEquals("final", modifiers[1].name) val overrideReferences = references(DocumentationReference.Kind.Override) - assertEquals(1, overrideReferences.size()) + assertEquals(1, overrideReferences.size) } } } @@ -235,11 +235,11 @@ public class ClassTest { verifyModel("test/data/classes/indirectOverride.kt") { model -> with(model.members.single().members.first { it.name == "E"}.members.first { it.name == "foo" }) { val modifiers = details(DocumentationNode.Kind.Modifier) - assertEquals(2, modifiers.size()) + assertEquals(2, modifiers.size) assertEquals("final", modifiers[1].name) val overrideReferences = references(DocumentationReference.Kind.Override) - assertEquals(1, overrideReferences.size()) + assertEquals(1, overrideReferences.size) } } } @@ -248,7 +248,7 @@ public class ClassTest { verifyPackageMember("test/data/classes/innerClass.kt") { cls -> val innerClass = cls.members.single { it.name == "D" } val modifiers = innerClass.details(DocumentationNode.Kind.Modifier) - assertEquals(3, modifiers.size()) + assertEquals(3, modifiers.size) assertEquals("inner", modifiers[2].name) } } @@ -258,15 +258,15 @@ public class ClassTest { val pkg = model.members.single() val cls = pkg.members.single { it.name == "Foo" } val extensions = cls.extensions.filter { it.kind == DocumentationNode.Kind.CompanionObjectProperty } - assertEquals(1, extensions.size()) + assertEquals(1, extensions.size) } } @Test fun secondaryConstructor() { verifyPackageMember("test/data/classes/secondaryConstructor.kt") { cls -> val constructors = cls.members(DocumentationNode.Kind.Constructor) - assertEquals(2, constructors.size()) - with (constructors.first { it.details(DocumentationNode.Kind.Parameter).size()== 1}) { + assertEquals(2, constructors.size) + with (constructors.first { it.details(DocumentationNode.Kind.Parameter).size == 1}) { assertEquals("<init>", name) assertEquals("This is a secondary constructor.", summary.toTestString()) } diff --git a/test/src/model/JavaTest.kt b/test/src/model/JavaTest.kt index e74945c4..688cc8d9 100644 --- a/test/src/model/JavaTest.kt +++ b/test/src/model/JavaTest.kt @@ -13,7 +13,7 @@ public class JavaTest { assertEquals("fn", name) assertEquals(DocumentationNode.Kind.Function, kind) assertEquals("Summary for Function", content.summary.toTestString().trimEnd()) - assertEquals(3, content.sections.size()) + assertEquals(3, content.sections.size) with(content.sections[0]) { assertEquals("Parameters", tag) assertEquals("name", subjectName) @@ -58,7 +58,7 @@ public class JavaTest { @Test fun superClass() { verifyPackageMember("test/data/java/superClass.java") { cls -> val superTypes = cls.details(DocumentationNode.Kind.Supertype) - assertEquals(2, superTypes.size()) + assertEquals(2, superTypes.size) assertEquals("Exception", superTypes[0].name) assertEquals("Cloneable", superTypes[1].name) } @@ -101,7 +101,7 @@ public class JavaTest { @Test fun constructors() { verifyPackageMember("test/data/java/constructors.java") { cls -> val constructors = cls.members(DocumentationNode.Kind.Constructor) - assertEquals(2, constructors.size()) + assertEquals(2, constructors.size) with(constructors[0]) { assertEquals("<init>", name) } @@ -146,7 +146,7 @@ public class JavaTest { @Test fun annotatedAnnotation() { verifyPackageMember("test/data/java/annotatedAnnotation.java") { cls -> - assertEquals(2, cls.annotations.size()) + assertEquals(2, cls.annotations.size) with(cls.annotations[0]) { assertEquals(1, details.count()) with(details[0]) { @@ -188,8 +188,8 @@ public class JavaTest { @Test fun enumValues() { verifyPackageMember("test/data/java/enumValues.java") { cls -> val superTypes = cls.details(DocumentationNode.Kind.Supertype) - assertEquals(0, superTypes.size()) - assertEquals(1, cls.members(DocumentationNode.Kind.EnumItem).size()) + assertEquals(0, superTypes.size) + assertEquals(1, cls.members(DocumentationNode.Kind.EnumItem).size) } } @@ -197,7 +197,7 @@ public class JavaTest { verifyPackageMember("test/data/java/inheritorLinks.java") { cls -> val fooClass = cls.members.single { it.name == "Foo" } val inheritors = fooClass.references(DocumentationReference.Kind.Inheritor) - assertEquals(1, inheritors.size()) + assertEquals(1, inheritors.size) } } } |