Update dependencies and refine code style

This commit is contained in:
Mygod
2019-09-19 10:35:51 +08:00
parent 5e2aeef1d2
commit 650b06beae
16 changed files with 105 additions and 42 deletions

View File

@@ -62,7 +62,7 @@ abstract class RoutingManager(private val caller: Any, val downstream: String, p
fun start() = when (val other = active.putIfAbsentCompat(downstream, this)) {
null -> initRouting()
this -> true // already started
else -> throw IllegalStateException("Double routing detected for $downstream from $caller != ${other.caller}")
else -> error("Double routing detected for $downstream from $caller != ${other.caller}")
}
private fun initRouting() = try {