paperparcel
paperparcel copied to clipboard
CREATOR of an improper type is not reported as an error
Hi, I've just found my own bug in this code causing an IllegalArgumentException
:
@PaperParcel
data class MultiSearchState(
val searchQuery: String? = null,
val activeSearchType: SearchType = SearchType.MOVIES
) : ViewState, PaperParcelable {
companion object {
@JvmField val CREATOR = PaperParcelSearchState_SearchStarted.CREATOR
}
}
The problem was the CREATOR
val referring to another's class (SearchState.SearchStarted
not MultiSearchState
) creator. That's totally my mistake but it might be a good idea to show some error or warning. It's probably an often mistake after copy/paste. Anyway, thanks for the great library! It's the best.