IDEA-86160 Constant conditions & exceptions: no highlighting when one is expected

This commit is contained in:
peter
2012-05-23 13:39:50 +02:00
parent 27db14bdcf
commit 5404261268
3 changed files with 31 additions and 23 deletions
@@ -0,0 +1,12 @@
class Foo {
public void foo() {
final boolean flag = true;
bar(<warning descr="Condition 'flag' is always 'true'">flag</warning> ? "a" : "b",
<warning descr="Condition 'flag' is always 'true'">flag</warning> ? new String[]{"aa"} : new String[]{"bb"}
);
}
void bar(String b, String[] a) {
}
}