More cleanup: lift return / assignment out

Original commit: dfe2c16bc7
This commit is contained in:
Mikhail Glukhikh
2017-07-07 13:57:36 +03:00
parent 41e4f7eaba
commit 3f0e3902f0
@@ -224,12 +224,10 @@ class JpsKotlinCompilerRunner : KotlinCompilerRunner<JpsCompilerEnvironment>() {
}
}
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? =