Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.2.5 java.lang.IndexOutOfBoundsException: Inconsistency detected #709

Closed
5 tasks done
AllanWang opened this issue Aug 3, 2018 · 1 comment
Closed
5 tasks done

Comments

@AllanWang
Copy link
Contributor

About this issue

(Similar report at #602 (fixed))

The implemented diff callback checks if items are the same using the identifier. This works fine, but if I set the comparator to check for the identifier, I get an OOB exception. The log is very similar to #602

To give more context, my adapter currently cycles through 2 item types. For one of them, the identifier works fine, whereas the other has inconsistent identifiers (which is why I wanted to use types). If I simply override that item creation to set the identifier to the hash of its data model and continue comparing by identifier, everything works fine. However, this moreso emulates the areContentsTheSame method. Is there something I'm not understanding here as to why comparing by type doesn't work?

Details

  • [3.2.5] Used library version
  • [28.0.0-alpha3] Used support library version
  • [3.1.3] Used gradle build tools version
  • [3.1.3] Used tooling / Android Studio version
  • [NA] Other used libraries, potential conflicting libraries

Checklist

@FabianTerhorst
Copy link
Contributor

The identifier must be unique inside an adapter. Two items can't have the same identifier even when there type id is different.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants