More cleanup: lift return / assignment out

This commit is contained in:
Mikhail Glukhikh
2017-07-07 13:57:36 +03:00
parent 9269de721e
commit dfe2c16bc7
116 changed files with 472 additions and 517 deletions
@@ -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? =