mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-27 19:28:58 +07:00
13 lines
265 B
Java
13 lines
265 B
Java
// "Replace 'map()' with 'flatMap()'" "true"
|
|
import java.util.*;
|
|
|
|
class Test {
|
|
native Optional<String> getOptional();
|
|
|
|
void test(Optional<Test> opt) {
|
|
/*0*/
|
|
/*1*/
|
|
/*2*/
|
|
opt.flatMap(Test::getOptional).ifPresent(System.out::println);
|
|
}
|
|
} |