mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-04 20:30:42 +07:00
21 lines
510 B
Java
21 lines
510 B
Java
// "Fix all 'Optional can be replaced with sequence of if statements' problems in file" "true"
|
|
|
|
import java.util.*;
|
|
|
|
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;
|
|
}
|
|
|
|
} |