mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-06 21:55:38 +07:00
9 lines
242 B
Java
9 lines
242 B
Java
// "Replace 'map()' with 'flatMap()'" "true"
|
|
import java.util.*;
|
|
|
|
class Test {
|
|
void test() {
|
|
Optional<Test> opt = Optional.of(new Test());
|
|
opt.<caret>map/*0*/(a -> Optional.of("foo")/*1*/.get()).ifPresent(System.out::println);
|
|
}
|
|
} |