Files
Tagir Valeevandintellij-monorepo-bot 8e242ccfca [java-dfa] Find the cause: cosmetic changes in messages
GitOrigin-RevId: 01b45074f9c8adc03bc788958ecba2fde134e55d
2021-06-23 04:51:46 +00:00

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>) {
}
}
}