From 70778b10625ce38efcf8465912ee8be66be92912 Mon Sep 17 00:00:00 2001 From: Alexey Sedunov Date: Wed, 25 Oct 2017 12:30:11 +0300 Subject: [PATCH] Misc: Fix deserialization of CommonCompilerArguments.freeArgs #KT-20938 Fixed Original commit: cfad305826f3e50ebcb547aba0f4762317b53ac6 --- .../src/org/jetbrains/kotlin/config/facetSerialization.kt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/jps/jps-common/src/org/jetbrains/kotlin/config/facetSerialization.kt b/jps/jps-common/src/org/jetbrains/kotlin/config/facetSerialization.kt index 167bb61393c..61636b121d1 100644 --- a/jps/jps-common/src/org/jetbrains/kotlin/config/facetSerialization.kt +++ b/jps/jps-common/src/org/jetbrains/kotlin/config/facetSerialization.kt @@ -58,8 +58,7 @@ private fun readV1Config(element: Element): KotlinFacetSettings { val jvmArgumentsElement = compilerInfoElement?.getOptionBody("k2jvmCompilerArguments") val jsArgumentsElement = compilerInfoElement?.getOptionBody("k2jsCompilerArguments") - val compilerArguments = targetPlatform.createCompilerArguments() - compilerArguments.freeArgs = ArrayList() + val compilerArguments = targetPlatform.createCompilerArguments { freeArgs = ArrayList() } commonArgumentsElement?.let { XmlSerializer.deserializeInto(compilerArguments, it) } when (compilerArguments) { @@ -105,7 +104,7 @@ private fun readV2AndLaterConfig(element: Element): KotlinFacetSettings { XmlSerializer.deserializeInto(compilerSettings!!, it) } element.getChild("compilerArguments")?.let { - compilerArguments = platformKind.createCompilerArguments() + compilerArguments = platformKind.createCompilerArguments { freeArgs = ArrayList() } XmlSerializer.deserializeInto(compilerArguments!!, it) } testOutputPath = element.getChild("testOutputPath")?.let {