Is it possible to have a data class that has a java class as a property? Was getting an issue when comparing two equivalent data classes. Found out there was no toEquals/toString override on the java class so it was showing the class@hash value. I added those methods to the class and I see the data classes now have the same values but it’s still failing the comparison.
g
gildor
06/13/2019, 1:42 AM
This is not a problem of data class and not really Java problem, this class just doesn’t overrider hascode/equal, so comparing by reference, so always return false for any other instance of the same class
d
dMusicb
06/13/2019, 1:46 AM
Yeah I added the override methods to the class and same issue