1
0
Fork 0
mirror of https://github.com/ethauvin/kobalt.git synced 2025-04-26 08:27:12 -07:00

Bug due to weird behavior of split().

Somehow, “”.split(“ “) == arrayOf(“”).
This commit is contained in:
Cedric Beust 2017-01-28 10:14:11 -08:00
parent 1600056102
commit 1a01c85fe8

View file

@ -95,8 +95,7 @@ class KotlinCompiler @Inject constructor(
.joinToString(File.pathSeparator)
val xFlagsString = kotlinConfig(project)?.args?.joinToString(" ")
?: settings.kobaltCompilerFlags
?: ""
val xFlagsArray = xFlagsString.split(" ").toTypedArray()
val xFlagsArray = xFlagsString?.split(" ")?.toTypedArray() ?: emptyArray()
val newArgs = listOf(
"-classpath", compilerClasspath,
K2JVMCompiler::class.java.name,