diff --git a/jps/jps-plugin/src/org/jetbrains/kotlin/compilerRunner/KotlinCompilerRunner.kt b/jps/jps-plugin/src/org/jetbrains/kotlin/compilerRunner/KotlinCompilerRunner.kt index b723b1c66b6..7c8fb1d0139 100644 --- a/jps/jps-plugin/src/org/jetbrains/kotlin/compilerRunner/KotlinCompilerRunner.kt +++ b/jps/jps-plugin/src/org/jetbrains/kotlin/compilerRunner/KotlinCompilerRunner.kt @@ -137,7 +137,7 @@ public object KotlinCompilerRunner { internal object getDaemonConnection { private @Volatile var connection: DaemonConnection? = null - @Synchronized operator fun invoke(environment: CompilerEnvironment, messageCollector: MessageCollector): DaemonConnection? { + @Synchronized operator fun invoke(environment: CompilerEnvironment, messageCollector: MessageCollector): DaemonConnection { if (connection == null) { val libPath = CompilerRunnerUtil.getLibPath(environment.kotlinPaths, messageCollector) val compilerId = CompilerId.makeCompilerId(File(libPath, "kotlin-compiler.jar")) @@ -159,7 +159,7 @@ public object KotlinCompilerRunner { return flagFile } val daemon = KotlinCompilerClient.connectToCompileService(compilerId, daemonJVMOptions, daemonOptions, DaemonReportingTargets(null, daemonReportMessages), true, true) - connection = DaemonConnection(daemon, daemon?.leaseCompileSession(newFlagFile().absolutePath)?.get() ?:CompileService.NO_SESSION) + connection = DaemonConnection(daemon, daemon?.leaseCompileSession(newFlagFile().absolutePath)?.get() ?: CompileService.NO_SESSION) } for (msg in daemonReportMessages) { @@ -170,7 +170,7 @@ public object KotlinCompilerRunner { reportTotalAndThreadPerf("Daemon connect", daemonOptions, messageCollector, profiler) } - return connection + return connection!! } } diff --git a/jps/jps-plugin/test/org/jetbrains/kotlin/jps/build/SimpleKotlinJpsBuildTest.kt b/jps/jps-plugin/test/org/jetbrains/kotlin/jps/build/SimpleKotlinJpsBuildTest.kt index c0458769bd8..5f4127160a0 100644 --- a/jps/jps-plugin/test/org/jetbrains/kotlin/jps/build/SimpleKotlinJpsBuildTest.kt +++ b/jps/jps-plugin/test/org/jetbrains/kotlin/jps/build/SimpleKotlinJpsBuildTest.kt @@ -88,7 +88,7 @@ public class SimpleKotlinJpsBuildTest : AbstractKotlinJpsBuildTestCase() { // copied from CompilerDaemonTest.kt // TODO: find shared place for this function -// java.util.logger used in the daemon silently forgets to log into a file specified in the config on Windows, +// java.util.Logger used in the daemon silently forgets to log into a file specified in the config on Windows, // if file path is given in windows form (using backslash as a separator); the reason is unknown // this function makes a path with forward slashed, that works on windows too internal val File.loggerCompatiblePath: String