mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-17 07:20:53 +07:00
15 lines
337 B
Java
15 lines
337 B
Java
// "Make 'hasEmpty' effectively final using stream API" "true-preview"
|
|
import java.util.*;
|
|
|
|
class X {
|
|
void test(List<String> list) {
|
|
boolean hasEmpty = false;
|
|
for (String s : list) {
|
|
if (s.isEmpty()) {
|
|
hasEmpty = true;
|
|
break;
|
|
}
|
|
}
|
|
Runnable r = () -> System.out.println(<caret>hasEmpty);
|
|
}
|
|
} |