From: David ‘Bombe’ Roden Date: Fri, 6 Oct 2017 05:13:52 +0000 (+0200) Subject: Simplify expression X-Git-Tag: 0.9.7^2~13 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=93a86ab418b9fda1a7c2cde90e0503bd3ca7b1ea;p=Sone.git Simplify expression --- diff --git a/src/test/kotlin/net/pterodactylus/sone/web/ajax/JsonPageTest.kt b/src/test/kotlin/net/pterodactylus/sone/web/ajax/JsonPageTest.kt index 84fca49..ea882d3 100644 --- a/src/test/kotlin/net/pterodactylus/sone/web/ajax/JsonPageTest.kt +++ b/src/test/kotlin/net/pterodactylus/sone/web/ajax/JsonPageTest.kt @@ -20,7 +20,7 @@ abstract class JsonPageTest( page.createJsonObject(freenetRequest) } - private val JsonReturnObject.error get() = if (this is JsonErrorReturnObject) this.error else null + private val JsonReturnObject.error get() = (this as? JsonErrorReturnObject)?.error protected fun assertThatJsonIsSuccessful() { assertThat(json.isSuccess, equalTo(true))