mcharmas/android-parcelable-intellij-plugin

Parcelable[] instead of Parcelable

cesards opened this issue · 1 comments

There is a bug in the code generation of Parcelables. I'm using an array of Parcelables as attribute and it's writing:

@Override public void writeToParcel(Parcel dest, int flags) {
    dest.writeParcelable(this.overlayImages, flags);
}
private InGameInfoBundle(Parcel in) {
    this.overlayImages = in.readParcelable(OverlayImage[].class.getClassLoader());
}

instead of

@Override public void writeToParcel(Parcel dest, int flags) {
    dest.writeParcelableArray(this.overlayImages, flags);
}
private InGameInfoBundle(Parcel in) {
    this.overlayImages = (OverlayImage[]) in.readParcelableArray(OverlayImage.class.getClassLoader());
}

Thx!!

This should be fixed in 0.6.2 (in review by JetBrains).