Fix "Should be replaced with Kotlin function" warnings
This commit is contained in:
@@ -20,6 +20,7 @@ import java.io.File
|
||||
import java.io.FileNotFoundException
|
||||
import java.net.URL
|
||||
import java.util.*
|
||||
import kotlin.system.exitProcess
|
||||
|
||||
object Main {
|
||||
private val KOTLIN_HOME: File
|
||||
@@ -28,7 +29,7 @@ object Main {
|
||||
val home = System.getProperty("kotlin.home")
|
||||
if (home == null) {
|
||||
System.err.println("error: no kotlin.home system property was passed")
|
||||
System.exit(1)
|
||||
exitProcess(1)
|
||||
}
|
||||
KOTLIN_HOME = File(home)
|
||||
}
|
||||
@@ -120,7 +121,7 @@ object Main {
|
||||
}
|
||||
catch (e: RunnerException) {
|
||||
System.err.println("error: " + e.message)
|
||||
System.exit(1)
|
||||
exitProcess(1)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -143,7 +144,7 @@ where command may be one of:
|
||||
-version Display Kotlin version
|
||||
-help (-h) Print a synopsis of options
|
||||
""")
|
||||
System.exit(0)
|
||||
exitProcess(0)
|
||||
}
|
||||
|
||||
private fun printVersionAndExit() {
|
||||
@@ -155,6 +156,6 @@ where command may be one of:
|
||||
}
|
||||
|
||||
println("Kotlin version " + version + " (JRE " + System.getProperty("java.runtime.version") + ")")
|
||||
System.exit(0)
|
||||
exitProcess(0)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,6 +33,7 @@ import java.io.PrintStream
|
||||
import java.net.URL
|
||||
import java.net.URLConnection
|
||||
import java.util.function.Predicate
|
||||
import kotlin.system.exitProcess
|
||||
|
||||
abstract class CLITool<A : CommonToolArguments> {
|
||||
fun exec(errStream: PrintStream, vararg args: String): ExitCode {
|
||||
@@ -205,7 +206,7 @@ abstract class CLITool<A : CommonToolArguments> {
|
||||
}
|
||||
val exitCode = doMainNoExit(compiler, args)
|
||||
if (exitCode != ExitCode.OK) {
|
||||
System.exit(exitCode.code)
|
||||
exitProcess(exitCode.code)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ import org.jetbrains.kotlin.js.sourceMap.SourceMap3Builder
|
||||
import org.jetbrains.kotlin.js.util.TextOutputImpl
|
||||
import java.io.File
|
||||
import java.io.StringReader
|
||||
import kotlin.system.exitProcess
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
val outputFile = File(args[0])
|
||||
@@ -55,7 +56,7 @@ private fun mergeStdlibParts(outputFile: File, wrapperFile: File, baseDir: File,
|
||||
when (sourceMapParse) {
|
||||
is SourceMapError -> {
|
||||
System.err.println("Error parsing source map file $sourceMapFile: ${sourceMapParse.message}")
|
||||
System.exit(1)
|
||||
exitProcess(1)
|
||||
}
|
||||
is SourceMapSuccess -> {
|
||||
val sourceMap = sourceMapParse.value
|
||||
|
||||
Reference in New Issue
Block a user