我的Parcelable Model类的代码如下
@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
在将此类转换为Kotlin之前,Java代码运行良好。自从我在数据类的构造函数中初始化所有List以来,为什么会给出Null指针?