mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-19 17:29:34 +07:00
IDEA-163875 Inspection "Replace inefficient Stream API call chains ending with count()" should respect alignment settings
13 lines
378 B
Java
13 lines
378 B
Java
// "Replace the loop with Collection.removeIf" "true"
|
|
import java.util.Iterator;
|
|
import java.util.List;
|
|
|
|
public class Main {
|
|
public void testIterator(List<List<String>> data, boolean b) {
|
|
for(Ite<caret>rator<List<String>> iter = data.iterator(); iter.hasNext();) {
|
|
if(iter.next().isEmpty() && /* also check the flag */ b) {
|
|
iter.remove();
|
|
}
|
|
}
|
|
}
|
|
} |