mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-03 20:33:31 +07:00
GitOrigin-RevId: 22a46c15d8900d8a31514846755a013f6a67ad42
24 lines
521 B
Java
24 lines
521 B
Java
// "Replace lambda with method reference (may change semantics)" "true-preview"
|
|
import java.util.*;
|
|
import java.util.function.Predicate;
|
|
|
|
class Main {
|
|
public static void main(String[] args) {
|
|
final Test test = new Test();
|
|
final List<Sub> subs = Arrays.asList(new Sub(), new Sub());
|
|
|
|
subs.forEach(test.getSubs()::add);
|
|
}
|
|
|
|
private static class Test {
|
|
private final List<Sub> subs = new ArrayList<>();
|
|
|
|
private List<Sub> getSubs() {
|
|
return subs;
|
|
}
|
|
}
|
|
|
|
private static class Sub {
|
|
}
|
|
}
|