You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The init block in ByteArrayParcel throws an NPE because data is not set when setDataFromByteArray runs.
I'm not sure if this is caused by a compiler change in Kotlin 1.7, because ordinarily you'd get a compiler diagnostic like "data is not initialized".
The easiest fix would be to move the init { } block below where the data property is initialized.
Stacktrace:
Cannot invoke "java.util.List.clear()" because "this.data" is null
java.lang.NullPointerException: Cannot invoke "java.util.List.clear()" because "this.data" is null
at com.chrynan.parcelable.core.ByteArrayParcel.setDataFromByteArray(ByteArrayParcel.kt:188)
at com.chrynan.parcelable.core.ByteArrayParcel.<init>(ByteArrayParcel.kt:17)
at com.chrynan.parcelable.core.ByteArrayParcel.<init>(ByteArrayParcel.kt:14)
at com.chrynan.parcelable.core.JvmParcelKt.Parcel(JvmParcel.kt:3)
The text was updated successfully, but these errors were encountered:
The init block in
ByteArrayParcel
throws an NPE becausedata
is not set whensetDataFromByteArray
runs.I'm not sure if this is caused by a compiler change in Kotlin 1.7, because ordinarily you'd get a compiler diagnostic like "data is not initialized".
The easiest fix would be to move the
init { }
block below where thedata
property is initialized.Stacktrace:
The text was updated successfully, but these errors were encountered: