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