mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-01 22:43:40 +07:00
GitOrigin-RevId: 088ce28eb3b8cbbce9aa1cfc1b073fef2dab12ce
11 lines
331 B
Java
11 lines
331 B
Java
// "Replace loop with 'Collection.removeIf()'" "true"
|
|
import java.util.*;
|
|
|
|
public class Main {
|
|
public void removeEmpty(List<String> list) throws Exception {
|
|
// Copy to avoid CME
|
|
for<caret>(String item : list.toArray(new String[list.size()])) {
|
|
if(item.isEmpty()) list.remove(item);
|
|
}
|
|
}
|
|
} |