Skip to content

Commit

Permalink
Avoid adding duplicate resource classes.
Browse files Browse the repository at this point in the history
Avoids an issue where multiple Bitmap.class instances were added to the list resulting in duplicate load paths being created.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=182292756
  • Loading branch information
paulsowden authored and sjudd committed Jan 23, 2018
1 parent e9f682f commit 9d3a6ff
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ public synchronized <T, R> List<Class<R>> getResourceClasses(@NonNull Class<T> d
}
for (Entry<?, ?> entry : entries) {
if (entry.handles(dataClass, resourceClass)) {
result.add((Class<R>) entry.resourceClass);
if (!result.contains((Class<R>) entry.resourceClass)) {
result.add((Class<R>) entry.resourceClass);
}
}
}
}
Expand Down

0 comments on commit 9d3a6ff

Please sign in to comment.