Fix "Should be replaced with Kotlin function" warnings
This commit is contained in:
@@ -17,6 +17,7 @@ import org.jetbrains.kotlin.cli.jvm.K2JVMCompiler
|
||||
import org.jetbrains.kotlin.cli.jvm.modules.isAtLeastJava9
|
||||
import org.jetbrains.kotlin.kapt.cli.CliToolOption.Format.*
|
||||
import java.io.File
|
||||
import kotlin.system.exitProcess
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
val messageCollector = PrintingMessageCollector(System.err, MessageRenderer.PLAIN_RELATIVE_PATHS, false)
|
||||
@@ -29,7 +30,7 @@ fun main(args: Array<String>) {
|
||||
val kaptTransformed = transformArgs(args.asList(), messageCollector, false)
|
||||
|
||||
if (messageCollector.hasErrors()) {
|
||||
System.exit(ExitCode.COMPILATION_ERROR.code)
|
||||
exitProcess(ExitCode.COMPILATION_ERROR.code)
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
+2
-1
@@ -28,6 +28,7 @@ import javax.annotation.processing.RoundEnvironment
|
||||
import javax.lang.model.element.ElementKind
|
||||
import javax.lang.model.element.ExecutableElement
|
||||
import javax.lang.model.element.TypeElement
|
||||
import kotlin.system.exitProcess
|
||||
|
||||
class KotlinKapt3IntegrationTests : AbstractKotlinKapt3IntegrationTest(), Java9TestLauncher {
|
||||
override fun test(
|
||||
@@ -149,7 +150,7 @@ internal class SingleJUnitTestRunner {
|
||||
val (className, methodName) = args.single().split('#')
|
||||
val request = Request.method(Class.forName(className), methodName)
|
||||
val result = JUnitCore().run(request)
|
||||
System.exit(if (result.wasSuccessful()) 0 else 1)
|
||||
exitProcess(if (result.wasSuccessful()) 0 else 1)
|
||||
}
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -150,7 +150,7 @@ class ReplFromTerminal(
|
||||
|
||||
companion object {
|
||||
private fun splitCommand(command: String): List<String> {
|
||||
return Arrays.asList(*command.split(" ".toRegex()).dropLastWhile(String::isEmpty).toTypedArray())
|
||||
return listOf(*command.split(" ".toRegex()).dropLastWhile(String::isEmpty).toTypedArray())
|
||||
}
|
||||
|
||||
fun run(disposable: Disposable, configuration: CompilerConfiguration) {
|
||||
|
||||
Reference in New Issue
Block a user