Bernhard
05/06/2019, 10:53 AMval method = result.jsonObject?.get("result")?.asString
?: throwInsertionError(result)
return when (method) {
Czar
05/06/2019, 11:28 AMprivate fun ResultType.jsonResultAsString() = jsonObject?.get("result")?.asString
?: throwInsertionError(result)
//...
return when (val method = result.jsonResultAsString()) {
Where val method =
part is only needed if you're using method
in branches' bodiesMike
05/06/2019, 12:06 PMwhen (method)
, IntelliJ may be suggesting that it all get rolled into one when
statement…Alexey Belkov [JB]
05/14/2019, 9:15 AM