Files
openide/java/java-tests/testData/inspection/dataFlow/fixture/AccessorPlusMutator.java

23 lines
419 B
Java

class X {
private Object object = null;
void foo() {
Object tmp = getObject();
if (tmp == null) {
fill(); // object is initialized here
tmp = getObject(); // no longer null
if (tmp == null) { // false "condition 'tmp == null' is always 'true'" report
System.out.println(tmp);
}
}
}
public Object getObject() {
return object;
}
public void fill() {
}
}