mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-07 15:35:40 +07:00
GitOrigin-RevId: 01b45074f9c8adc03bc788958ecba2fde134e55d
18 lines
509 B
Java
18 lines
509 B
Java
/*
|
|
Value is always false (trim(b ? s : s) == ""; line#14)
|
|
According to inferred contract, method 'trim' returns 'null' when b ? s : s != null (trim; line#14)
|
|
's' is known to be 'non-null' from line #13 (s == null; line#13)
|
|
and expression cannot be null as it's literal (""; line#14)
|
|
*/
|
|
class X {
|
|
static String trim(String s) {
|
|
return s == null ? "foo" : null;
|
|
}
|
|
|
|
void foo(boolean b, String s) {
|
|
if (s == null) return;
|
|
if (<selection>trim(b ? s : s) == ""</selection>) {
|
|
|
|
}
|
|
}
|
|
} |