Generated classes that contain a View.ClickListener attribute has a method similar to the following:
public DateViewHolder_ clickListener(
@NonNull final OnModelClickListener<DateViewHolder_, ViewBindingHolder> clickListener) {
onMutation();
if (clickListener == null) {
super.setClickListener(null);
}
else {
super.setClickListener(new WrappedEpoxyModelClickListener(clickListener));
}
return this;
}
The code new WrappedEpoxyModelClickListener(clickListener) causes a warning similar to
warning: [unchecked] unchecked call to WrappedEpoxyModelClickListener(OnModelClickListener<T,V>) as a member of the raw type WrappedEpoxyModelClickListener
super.setClickListener(new WrappedEpoxyModelClickListener(clickListener));
^
where T,V are type-variables:
T extends EpoxyModel<?> declared in class WrappedEpoxyModelClickListener
V extends Object declared in class WrappedEpoxyModelClickListener
This PR resolves the warning by writing super.setClickListener(new WrappedEpoxyModelClickListener<>(clickListener)); to the generated code instead of super.setClickListener(new WrappedEpoxyModelClickListener(clickListener));
Also, XTypeElement.superType is Deprecated. Hence replacing it with XTypeElement.superClass
Generated classes that contain a View.ClickListener attribute has a method similar to the following:
The code
new WrappedEpoxyModelClickListener(clickListener)
causes a warning similar toThis PR resolves the warning by writing
super.setClickListener(new WrappedEpoxyModelClickListener<>(clickListener));
to the generated code instead ofsuper.setClickListener(new WrappedEpoxyModelClickListener(clickListener));
Also,
XTypeElement.superType
is Deprecated. Hence replacing it withXTypeElement.superClass