From 4a425e29fba4030d9cde7072ee6bf39ab7ae3668 Mon Sep 17 00:00:00 2001 From: Roman Elizarov Date: Fri, 22 Dec 2017 16:15:02 +0300 Subject: Supports hacks for MPP documentation generation --- core/src/main/kotlin/Analysis/AnalysisEnvironment.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'core') diff --git a/core/src/main/kotlin/Analysis/AnalysisEnvironment.kt b/core/src/main/kotlin/Analysis/AnalysisEnvironment.kt index 3b9b9149..56249ac4 100644 --- a/core/src/main/kotlin/Analysis/AnalysisEnvironment.kt +++ b/core/src/main/kotlin/Analysis/AnalysisEnvironment.kt @@ -114,15 +114,15 @@ class AnalysisEnvironment(val messageCollector: MessageCollector) : Disposable { val javaRoots = classpath - .map { + .mapNotNull { val rootFile = when { it.extension == "jar" -> - StandardFileSystems.jar().findFileByPath("${it.absolutePath}${URLUtil.JAR_SEPARATOR}")!! + StandardFileSystems.jar().findFileByPath("${it.absolutePath}${URLUtil.JAR_SEPARATOR}") else -> - StandardFileSystems.local().findFileByPath(it.absolutePath)!! + StandardFileSystems.local().findFileByPath(it.absolutePath) } - JavaRoot(rootFile, JavaRoot.RootType.BINARY) + rootFile?.let { JavaRoot(it, JavaRoot.RootType.BINARY) } } val resolverForProject = ResolverForProjectImpl( -- cgit