Open GoogleCodeExporter opened 9 years ago
I tried reproducing this issue, but neither release 1.8.11 nor trunk give a
warning for Main.java. Can you check your test case?
However, I think an error should be raised, and I created Issue 425 with a
reproduction without for loop.
Original comment by wdi...@gmail.com
on 4 Apr 2015 at 2:53
Sorry, in my attempts to minimize the test case I apparently got lost and
mightily confused :)
I'm attaching a new reproducer that should illustrate the issue.
Run with 1.8.11:
$CHECKER_HOME/checker/bin/javac -processor NullnessChecker Issue424.java
Original comment by metl...@gmail.com
on 7 Apr 2015 at 5:33
Attachments:
if (this.field == null) { this.field = new ...; }
this.field.use(); // <-- this is ok.
if (this.field == null) { this.field = new ...; }
for(int i = 0; i < 10; ++i) this.field.use(); // <-- this is reported as error
Original issue reported on code.google.com by
metl...@gmail.com
on 3 Apr 2015 at 10:07Attachments: