mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-06-07 01:29:56 +07:00
6f1efb8fc0
GitOrigin-RevId: c83b70e05544529b3dfffe24bc87997910edcb56
13 lines
386 B
Java
13 lines
386 B
Java
// "Fix all 'Optional can be replaced with sequence of if statements' problems in file" "true"
|
|
|
|
class Test {
|
|
|
|
boolean isPresent(String in) {
|
|
return Optional.of<caret>(in).map(in -> in.substring(3)).filter(s -> s.startsWith("1")).isPresent();
|
|
}
|
|
|
|
boolean isEmpty(String in) {
|
|
return Optional.of(in).map(in -> in.substring(3)).filter(s -> s.startsWith("1")).isEmpty();
|
|
}
|
|
|
|
} |