mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-10 18:09:38 +07:00
PR#2100 Co-authored-by: Tagir Valeev <tagir.valeev@jetbrains.com> GitOrigin-RevId: c0b8495f26bccf51c593deb6be927eb01c37d379
12 lines
329 B
Java
12 lines
329 B
Java
// "Replace Optional presence condition with functional style expression" "false"
|
|
|
|
import java.util.Arrays;
|
|
import java.util.List;
|
|
import java.util.Optional;
|
|
|
|
public class Main {
|
|
void test(Optional<String> foo) {
|
|
int defaultValue = 0;
|
|
double bar = foo.isPresent<caret>() ? foo.get().length() * 1.2 : defaultValue;
|
|
}
|
|
} |