Summary: | Loop confuses null pointer analysis | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Remy Suen <remy.suen> |
Component: | Core | Assignee: | Ayushman Jain <amj87.iitr> |
Status: | CLOSED DUPLICATE | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | CC: | srikanth_sankaran |
Version: | 3.6 | ||
Target Milestone: | 3.6 M5 | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Whiteboard: |
Description
Remy Suen
2010-01-20 13:33:57 EST
Ayush, please investigate. I think this got fixed with bug 293917. Remy, can you apply the patch given in bug 293917 and check again? I dont get the spurious warnings on the toString() call anymore. (In reply to comment #2) > I think this got fixed with bug 293917. > Remy, can you apply the patch given in bug 293917 and check again? I dont get > the spurious warnings on the toString() call anymore. The bug does not occur with N20100121 so I guess the problem has been resolved (indirectly?). *** This bug has been marked as a duplicate of bug 293917 *** Yes this is has been fixed. Earlier, whenevr a null check was done against a local variable, it got 'tainted' and marked as maybe null. Since in a loop, null check warnings are always deferred till the end of the loop, at the time of deciding whether o in o.toString() is null or not, it'd have already got unnecessarily tainted by the if statement. Hence the warning. This unnecessary tainting of local variables is done away with now. |