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