diff --git a/jps/jps-plugin/src/org/jetbrains/kotlin/jps/build/KotlinBuilder.kt b/jps/jps-plugin/src/org/jetbrains/kotlin/jps/build/KotlinBuilder.kt index cf165fdd2a2..489f7247f21 100644 --- a/jps/jps-plugin/src/org/jetbrains/kotlin/jps/build/KotlinBuilder.kt +++ b/jps/jps-plugin/src/org/jetbrains/kotlin/jps/build/KotlinBuilder.kt @@ -138,7 +138,7 @@ public class KotlinBuilder : ModuleLevelBuilder(BuilderCategory.SOURCE_PROCESSOR val dataManager = projectDescriptor.dataManager if (chunk.targets.any { dataManager.dataPaths.getKotlinCacheVersion(it).isIncompatible() }) { - LOG.info("Clearing caches for " + chunk.targets.map { it.presentableName }.join()) + LOG.info("Clearing caches for " + chunk.targets.joinToString { it.presentableName }) chunk.targets.forEach { dataManager.getKotlinCache(it).clean() } return CHUNK_REBUILD_REQUIRED } @@ -278,7 +278,7 @@ public class KotlinBuilder : ModuleLevelBuilder(BuilderCategory.SOURCE_PROCESSOR ): OutputItemsCollectorImpl? { if (JpsUtils.isJsKotlinModule(chunk.representativeTarget())) { - LOG.debug("Compiling to JS ${filesToCompile.values().size()} files in " + filesToCompile.keySet().map { it.getPresentableName() }.join()) + LOG.debug("Compiling to JS ${filesToCompile.values().size()} files in ${filesToCompile.keySet().joinToString { it.presentableName }}") return compileToJs(chunk, commonArguments, environment, null, messageCollector, project) } @@ -563,7 +563,7 @@ public class KotlinBuilder : ModuleLevelBuilder(BuilderCategory.SOURCE_PROCESSOR val moduleFile = KotlinBuilderModuleScriptGenerator.generateModuleDescription(context, chunk, filesToCompile, totalRemovedFiles != 0) if (moduleFile == null) { - KotlinBuilder.LOG.debug("Not compiling, because no files affected: " + filesToCompile.keySet().map { it.getPresentableName() }.join()) + KotlinBuilder.LOG.debug("Not compiling, because no files affected: " + filesToCompile.keySet().joinToString { it.presentableName }) // No Kotlin sources found return null } @@ -574,7 +574,7 @@ public class KotlinBuilder : ModuleLevelBuilder(BuilderCategory.SOURCE_PROCESSOR KotlinBuilder.LOG.debug("Compiling to JVM ${filesToCompile.values().size()} files" + (if (totalRemovedFiles == 0) "" else " ($totalRemovedFiles removed files)") - + " in " + filesToCompile.keySet().map { it.getPresentableName() }.join()) + + " in " + filesToCompile.keySet().joinToString { it.presentableName }) KotlinCompilerRunner.runK2JvmCompiler(commonArguments, k2JvmArguments, compilerSettings, messageCollector, environment, moduleFile, outputItemCollector) moduleFile.delete() diff --git a/jps/jps-plugin/src/org/jetbrains/kotlin/jps/incremental/IncrementalCacheImpl.kt b/jps/jps-plugin/src/org/jetbrains/kotlin/jps/incremental/IncrementalCacheImpl.kt index 3de1a1a4800..d81670d633f 100644 --- a/jps/jps-plugin/src/org/jetbrains/kotlin/jps/incremental/IncrementalCacheImpl.kt +++ b/jps/jps-plugin/src/org/jetbrains/kotlin/jps/incremental/IncrementalCacheImpl.kt @@ -110,7 +110,7 @@ public class IncrementalCacheImpl( @TestOnly public fun dump(): String { - return maps.map { it.dump() }.join("\n\n") + return maps.joinToString("\n\n") { it.dump() } } public fun markOutputClassesDirty(removedAndCompiledSources: List) { @@ -769,7 +769,7 @@ private fun , V> Map.dumpMap(dumpValue: (V)->String): St @TestOnly public fun > Collection.dumpCollection(): String = - "[${sorted().map(Any::toString).join(", ")}]" + "[${sorted().joinToString(", ", transform = Any::toString)}]" private class PathFunctionPair( public val path: String, diff --git a/jps/jps-plugin/test/org/jetbrains/kotlin/jps/build/AbstractLookupTrackerTest.kt b/jps/jps-plugin/test/org/jetbrains/kotlin/jps/build/AbstractLookupTrackerTest.kt index 1730b0be18d..11d189dfa57 100644 --- a/jps/jps-plugin/test/org/jetbrains/kotlin/jps/build/AbstractLookupTrackerTest.kt +++ b/jps/jps-plugin/test/org/jetbrains/kotlin/jps/build/AbstractLookupTrackerTest.kt @@ -88,7 +88,7 @@ abstract class AbstractLookupTrackerTest : AbstractIncrementalJpsTest( start = end } - lines[line - 1] = parts.join("") + lineContent.subSequence(start, lineContent.length) + lines[line - 1] = parts.joinToString("") + lineContent.subSequence(start, lineContent.length) } val actual = lines.joinToString("\n")