mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +01:00
Add comments
This commit is contained in:
parent
b15faa9a35
commit
e2c8f30a95
1 changed files with 3 additions and 1 deletions
|
|
@ -223,10 +223,12 @@ public class CategorizationFragment extends Fragment {
|
|||
|
||||
//Needs to be an ArrayList and not a List unless we want to modify a big portion of preexisting code
|
||||
ArrayList<String> mergedItemsList = new ArrayList<String>(mergedItems);
|
||||
|
||||
|
||||
//Copy to Iterator to prevent ConcurrentModificationException
|
||||
for(Iterator<String> item = mergedItemsList.iterator(); item.hasNext();) {
|
||||
String s = item.next();
|
||||
|
||||
//Check if s contains a 4-digit word anywhere within the string (.* is wildcard)
|
||||
if(s.matches(".*\\d{4}.*")) {
|
||||
Log.d(TAG, "Filtering out year " + s);
|
||||
item.remove();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue