let method calls on other instances not affect our fields (IDEA-92380)

This commit is contained in:
peter
2013-02-03 22:42:57 +01:00
parent b418e60060
commit aa671e4c3f
7 changed files with 38 additions and 6 deletions
@@ -56,12 +56,12 @@ class Foo {
System.out.println(data.hashCode());
}
void dontWarnWhenDoubleChecked_This_WithMethodCall() {
void warnWhenDoubleChecked_This_WithMethodCall() {
if (data == null) {
return;
}
System.out.println(data.hashCode());
if (data == null) {
if (<warning descr="Condition 'data == null' is always 'false'">data == null</warning>) {
return;
}
System.out.println(data.hashCode());