mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 15:27:45 +07:00
GitOrigin-RevId: 9aaad61ae52463727c77930af532258ea16dd1da
12 lines
303 B
Java
12 lines
303 B
Java
// "Remove folded 'ifPresent()' call" "true"
|
|
import java.util.*;
|
|
|
|
class Test {
|
|
native String getNonOptional();
|
|
|
|
static native Optional<String> getOptional(Test v);
|
|
|
|
void test(Optional<Test> opt) {
|
|
opt.map(Test::getNonOptional).flatMap(x -> getOptional(x)).ifPresent(System.out::println);
|
|
}
|
|
} |