diff --git a/jps/jps-plugin/src/org/jetbrains/kotlin/compilerRunner/JpsKotlinCompilerRunner.kt b/jps/jps-plugin/src/org/jetbrains/kotlin/compilerRunner/JpsKotlinCompilerRunner.kt index b3f71c05b45..c32fe8ac171 100644 --- a/jps/jps-plugin/src/org/jetbrains/kotlin/compilerRunner/JpsKotlinCompilerRunner.kt +++ b/jps/jps-plugin/src/org/jetbrains/kotlin/compilerRunner/JpsKotlinCompilerRunner.kt @@ -224,12 +224,10 @@ class JpsKotlinCompilerRunner : KotlinCompilerRunner() { } } - private fun getReturnCodeFromObject(rc: Any?): String { - when { - rc == null -> return INTERNAL_ERROR - ExitCode::class.java.name == rc::class.java.name -> return rc.toString() - else -> throw IllegalStateException("Unexpected return: " + rc) - } + private fun getReturnCodeFromObject(rc: Any?): String = when { + rc == null -> INTERNAL_ERROR + ExitCode::class.java.name == rc::class.java.name -> rc.toString() + else -> throw IllegalStateException("Unexpected return: " + rc) } override fun getDaemonConnection(environment: JpsCompilerEnvironment): CompileServiceSession? =