The Code for my Parcelable Model class is below,
@Parcelize
data class Client(
@SerializedName("id")
var id: Int = 0,
@SerializedName("accountNo")
var accountNo: String? = null,
@SerializedName("status")
private val status: Status,
@SerializedName("active")
private val active: Boolean?,
@SerializedName("activationDate")
var activationDate: List<Int> = ArrayList(),
@SerializedName("dateOfBirth")
var dobDate: List<Int> = ArrayList(),
@SerializedName("clientClassification")
var clientClassification: @RawValue ClientClassification? = null,
@SerializedName("clientType")
var clientType: @RawValue ClientType? = null,
@SerializedName("gender")
var gender: @RawValue Gender? = null,
@SerializedName("groups")
var groups: @RawValue List<Group> = ArrayList()
) : Parcelable
Before converting this class to Kotlin, Java code was working fine. Why is it giving Null Pointer since I'm initializing all the List in the constructor of the data class ?