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