Fix "testUnresolvedDependency"

This fix is work-around fixing incompatibility issue between gradle
tooling api bundled in IDEA and gradle tooling api in gradle 4.x.
When null messages were logged it resulted in the following error:
"java.io.StreamCorruptedException: invalid stream header: ED000573"
This commit is contained in:
Andrey Uskov
2019-01-16 13:58:38 +03:00
parent e483f83666
commit 5302470f6b
2 changed files with 2 additions and 2 deletions
@@ -273,7 +273,7 @@ class KotlinMPPGradleModelBuilder : ModelBuilderService {
private fun safelyGetArguments(compileKotlinTask: Task, accessor: Method?) = try {
accessor?.invoke(compileKotlinTask) as? List<String>
} catch (e: Exception) {
logger.info(e.message, e)
logger.info(e.message ?: "Unexpected exception: $e", e)
null
} ?: emptyList()
@@ -264,7 +264,7 @@ class KotlinMPPGradleModelBuilder : ModelBuilderService {
private fun safelyGetArguments(compileKotlinTask: Task, accessor: Method?) = try {
accessor?.invoke(compileKotlinTask) as? List<String>
} catch (e: Exception) {
logger.info(e.message, e)
logger.info(e.message ?: "Unexpected exception: $e", e)
null
} ?: emptyList()