Gokhan Alıcı
03/27/2019, 11:54 AMmarstran
03/27/2019, 11:57 AMendTime == 0. It will give you a compile error if the types don't match. You usually don't use equals directly in Kotlin.ribesg
03/27/2019, 12:06 PMendTime.let { it == null || it == 0 }ribesg
03/27/2019, 12:07 PMendTime isn’t a var so this should work endTime == null || endTime == 0Gokhan Alıcı
03/28/2019, 8:40 AMGokhan Alıcı
03/28/2019, 8:43 AMmarstran
03/28/2019, 8:51 AMendTime == 0L. Kotlin does not perform any conversions like Java do.marstran
03/28/2019, 8:51 AMequals function takes an Any as parameter, so it just doesn't check types at all.marstran
03/28/2019, 8:55 AMInteger.valueOf(someInt).equals(someLong) will always return false in Java. It's better to have it give a compile error.ribesg
03/28/2019, 8:57 AMendTime == 0 would always be false so why allow it anyway? You need
endTime == null || endTime == 0L