[java] recognizes '--add-modules <module>' option format (IDEA-181150)

This commit is contained in:
Roman Shevchenko
2017-10-25 18:41:44 +02:00
parent a41365069e
commit f2d4c4f4a2
@@ -149,12 +149,11 @@ class JavaPlatformModuleSystem : JavaModuleSystemEx {
else {
var useValue = false
options.asSequence()
.filter { it.startsWith(name) }
.map {
when {
it.length == name.length -> { useValue = true; "" }
it == name -> { useValue = true; "" }
useValue -> { useValue = false; it }
it[name.length] == '=' -> it.substring(name.length + 1)
it.startsWith(name) && it[name.length] == '=' -> it.substring(name.length + 1)
else -> ""
}
}