Use mutable lists before deserialization of project structure

The problem is that we perform xml deserialization using intellij
 mechanism which tries to clear target object if it isn't unmodifiable
 (see CollectionBinding.isMutableCollection). This check fails for
 kotlin.EmptyList (emptyList()) which then cause exception

 #KT-27321 Fixed

Original commit: e74469fdfc
This commit is contained in:
Mikhail Zarechenskiy
2018-10-01 14:54:11 +03:00
parent b147abbf53
commit 1803d2bed4
@@ -138,7 +138,10 @@ private fun readV2AndLaterConfig(element: Element): KotlinFacetSettings {
XmlSerializer.deserializeInto(compilerSettings!!, it)
}
element.getChild("compilerArguments")?.let {
compilerArguments = targetPlatform.createArguments { freeArgs = ArrayList() }
compilerArguments = targetPlatform.createArguments {
freeArgs = mutableListOf()
internalArguments = mutableListOf()
}
XmlSerializer.deserializeInto(compilerArguments!!, it)
compilerArguments!!.detectVersionAutoAdvance()
}