public class ListLceViewState<D extends List<? extends Parcelable>, V extends MvpLceView<D>>
extends AbsParcelableLceViewState<D, V> {
public static final Parcelable.Creator<ListLceViewState> CREATOR =
new Parcelable.Creator<ListLceViewState>() {
@Override public ListLceViewState createFromParcel(Parcel source) {
return new ListLceViewState(source);
}
@Override public ListLceViewState[] newArray(int size) {
return new ListLceViewState[size];
}
};
public ListLceViewState() {
// Do nothing
}
private ListLceViewState(Parcel source) {
readFromParcel(source);
}
@Override public void writeToParcel(Parcel dest, int flags) {
dest.writeList(loadedData);
super.writeToParcel(dest, flags);
}
@Override protected void readFromParcel(Parcel source) {
List list = new ArrayList<>();
source.readList(list, getClassLoader());
super.readFromParcel(source);
}
/**
* The class loader used for deserializing the list of parcelable items
*/
protected ClassLoader getClassLoader() {
return getClass().getClassLoader();
}
}
Due to https://sbforge.org/sonar/rules/show/squid:S1319 I start refactor classes and faced with ArrayListLceViewState
My suggestion is to introduce: