dfa: avoid false positives when method calls change state (IDEA-107604)

This commit is contained in:
peter
2013-05-22 18:08:59 +02:00
parent e855e1948c
commit 2cda0cd109
13 changed files with 108 additions and 55 deletions
@@ -54,12 +54,12 @@ class Foo {
System.out.println(data.hashCode());
}
void warnWhenDoubleChecked_This_WithMethodCall() {
void doNotWarnWhenDoubleChecked_This_WithMethodCall() {
if (data == null) {
return;
}
System.out.println(data.hashCode());
if (<warning descr="Condition 'data == null' is always 'false'">data == null</warning>) {
if (data == null) {
return;
}
System.out.println(data.hashCode());