From ec2dfa898b4cf2613ca15cd959a43f4f590005d3 Mon Sep 17 00:00:00 2001 From: Xerus <27jf@web.de> Date: Thu, 13 Dec 2018 17:45:46 +0100 Subject: Fix IDEA Inspections --- core/src/main/kotlin/javadoc/docbase.kt | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'core/src/main/kotlin/javadoc/docbase.kt') diff --git a/core/src/main/kotlin/javadoc/docbase.kt b/core/src/main/kotlin/javadoc/docbase.kt index 2a14c6ff..f33b1324 100644 --- a/core/src/main/kotlin/javadoc/docbase.kt +++ b/core/src/main/kotlin/javadoc/docbase.kt @@ -326,8 +326,9 @@ open class ExecutableMemberAdapter(module: ModuleNodeAdapter, node: Documentatio override fun thrownExceptionTypes(): Array = emptyArray() override fun receiverType(): Type? = receiverNode()?.let { receiver -> TypeAdapter(module, receiver) } - override fun flatSignature(): String = node.details(NodeKind.Parameter).map { JavaLanguageService().renderType(it) }.joinToString(", ", "(", ")") - override fun signature(): String = node.details(NodeKind.Parameter).map { JavaLanguageService().renderType(it) }.joinToString(", ", "(", ")") // TODO it should be FQ types + override fun flatSignature(): String = node.details(NodeKind.Parameter).joinToString(", ", "(", ")") { JavaLanguageService().renderType(it) } + override fun signature(): String = + node.details(NodeKind.Parameter).joinToString(", ", "(", ")") { JavaLanguageService().renderType(it) } // TODO it should be FQ types override fun parameters(): Array = ((receiverNode()?.let { receiver -> listOf(ReceiverParameterAdapter(module, receiver, this)) } ?: emptyList()) @@ -469,10 +470,8 @@ open class ClassDocumentationNodeAdapter(module: ModuleNodeAdapter, val classNod } fun DocumentationNode.lookupSuperClasses(module: ModuleNodeAdapter) = - details(NodeKind.Supertype) - .map { it.links.firstOrNull() } - .map { module.allTypes[it?.qualifiedName()] } - .filterNotNull() + details(NodeKind.Supertype) + .map { it.links.firstOrNull() }.mapNotNull { module.allTypes[it?.qualifiedName()] } fun List.collectAllTypesRecursively(): Map { val result = hashMapOf() -- cgit