Data validation check missing from RealmBaseAdapter
Zhuinden opened this issue · 2 comments
Zhuinden commented
the validation check in RealmRecyclerViewAdapter
:
private boolean isDataValid() {
return adapterData != null && adapterData.isValid();
}
This is missing from RealmBaseAdapter
:
// RecyclerViewAdapter
@Override
public int getItemCount() {
//noinspection ConstantConditions
return isDataValid() ? adapterData.size() : 0;
}
// BaseAdapter
@Override
public int getCount() {
if (adapterData == null) {
return 0;
}
return adapterData.size();
}
Version of Realm and tooling
Realm version(s): 3.1.4
Android Studio version: -
Which Android version and device: -