mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-24 17:51:09 +07:00
11 lines
318 B
Java
11 lines
318 B
Java
// "Replace the loop with 'Collection.removeIf'" "true"
|
|
import java.util.*;
|
|
|
|
public class Main {
|
|
public void removeEmpty(List<String> list) throws Exception {
|
|
for<caret>(String item : list) {
|
|
// Presumably CopyOnWriteArrayList
|
|
if(item.isEmpty()) list.remove(item);
|
|
}
|
|
}
|
|
} |