mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 12:53:55 +01:00
Call remove() on ArrayList instead of Iterator
This commit is contained in:
parent
ae0ab0cf2d
commit
b83999b9b1
1 changed files with 3 additions and 6 deletions
|
|
@ -56,14 +56,11 @@ public class PrefixUpdater extends AsyncTask<Void, Void, ArrayList<String>> {
|
|||
//Check if s contains a 4-digit word anywhere within the string (.* is wildcard)
|
||||
if(s.matches(".*(19|20)\\d{2}.*")) {
|
||||
Log.d(TAG, "Filtering out year " + s);
|
||||
iterator.remove();
|
||||
items.remove(s);
|
||||
}
|
||||
}
|
||||
|
||||
ArrayList<String> filteredItems = new ArrayList<>();
|
||||
|
||||
|
||||
return filteredItems;
|
||||
|
||||
return items;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue