mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-08 15:09:39 +07:00
IDEA-163875 Inspection "Replace inefficient Stream API call chains ending with count()" should respect alignment settings
11 lines
307 B
Java
11 lines
307 B
Java
// "Replace the loop with Collection.removeIf" "true"
|
|
import java.util.*;
|
|
|
|
public class Main {
|
|
public void removeEmpty(List<String> list) throws Exception {
|
|
// remove empty
|
|
// everything is ok!
|
|
list.removeIf(str -> str.trim()/*trimmed empty*/
|
|
.isEmpty());
|
|
}
|
|
} |