mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-06-26 03:35:58 +07:00
6f1efb8fc0
GitOrigin-RevId: c83b70e05544529b3dfffe24bc87997910edcb56
19 lines
489 B
Java
19 lines
489 B
Java
// "Fix all 'Optional can be replaced with sequence of if statements' problems in file" "true"
|
|
|
|
class Test {
|
|
|
|
boolean isPresent(String in) {
|
|
if (in == null) throw new NullPointerException();
|
|
String s = in.substring(3);
|
|
if (s.startsWith("1")) return true;
|
|
return false;
|
|
}
|
|
|
|
boolean isEmpty(String in) {
|
|
if (in == null) throw new NullPointerException();
|
|
String s = in.substring(3);
|
|
if (s.startsWith("1")) return false;
|
|
return true;
|
|
}
|
|
|
|
} |