mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-26 12:20:55 +07:00
12 lines
315 B
Java
12 lines
315 B
Java
// "Collapse loop with stream 'anyMatch()'" "true-preview"
|
|
import java.util.List;
|
|
|
|
class X {
|
|
String test(List<String> list) {
|
|
if (list.stream().map(String::trim).anyMatch(String::isEmpty)) {
|
|
return null; // Comment
|
|
}
|
|
System.out.println("hello");
|
|
return "foo";
|
|
}
|
|
} |