irus
04/29/2016, 11:27 AMkirillrakhman
04/29/2016, 11:27 AMkirillrakhman
04/29/2016, 11:28 AMmartyglaubitz
04/29/2016, 11:29 AMcbruegg
04/29/2016, 11:30 AMmartyglaubitz
04/29/2016, 11:32 AMcbruegg
04/29/2016, 11:33 AMmartyglaubitz
04/29/2016, 11:36 AMkirillrakhman
04/29/2016, 1:46 PMval a: String? = null
val b = a?.isBlank() == true
doesn't produce a single allocation?dmitry.petrov
04/29/2016, 1:49 PMa?.isBlank()
can be null.
val a: String? = null
val b = a?.isBlank() ?: false // no allocation
We might be able to avoid that boxing. Do you find it more natural to write nullableBoolean == true
instead of nullableBoolean ?: false
?kirillrakhman
04/29/2016, 1:50 PMmichaelrocks
04/29/2016, 1:51 PMkirillrakhman
04/29/2016, 1:51 PMBoolean.valueOf
always returns a cached instancemichaelrocks
04/29/2016, 1:52 PMkirillrakhman
04/29/2016, 1:53 PM== true
produces different bytecode than ?: false
cedric
08/11/2016, 11:23 AMcedric
08/11/2016, 11:23 AMchristophsturm
08/11/2016, 11:23 AMnatpryce
08/11/2016, 11:23 AMassertThat({ throw ExecutionException(RuntimeException("cause")) },
throws<ExecutionException>(has(Throwable::message, contains("cause")))))))
christophsturm
08/11/2016, 11:24 AMnatpryce
08/11/2016, 11:24 AMchristophsturm
08/11/2016, 11:25 AMnatpryce
08/11/2016, 11:26 AMchristophsturm
08/11/2016, 11:29 AMnatpryce
08/11/2016, 11:33 AMnatpryce
08/11/2016, 11:34 AMnatpryce
08/11/2016, 11:35 AMnatpryce
08/11/2016, 11:35 AMmbickel
08/11/2016, 11:37 AMchristophsturm
08/11/2016, 11:37 AM