Tom Haywood
08/02/2021, 5:17 AMfun isXXX(current: Foo, previous: Foo?): Boolean {
val notTheSame = previous?.someField != someConstant
if (notTheSame) {
println("${previous?.someField} != $someConstant")
}
...
}
The data class:
data class Foo(
...
var someField: Short = initial,
...
)
The constants:
const val initial: Short = -1
const val someConstant: Short = 2
Could someone please help me understand the cause, or point me to where I should look? Code hasn't been touched for over a year, and I'm updating every single JAR used at the same time.
Thanks.Sourabh Rawat
08/02/2021, 8:32 AMcurrent
and previous
? Also, its best to use a debugger to find issues in such buggy code. We dont have a full picture, and it will take more time to explain for you to than just debug/log it.Tom Haywood
08/02/2021, 11:33 PMTom Haywood
08/02/2021, 11:50 PMTom Haywood
08/02/2021, 11:51 PMTom Haywood
08/03/2021, 2:10 AM