uber / NullAway

A tool to help eliminate NullPointerExceptions (NPEs) in your Java code with low build-time overhead
MIT License
3.63k stars 293 forks source link

Improve method matcher for AccessPathNullnessPropagation (#866) #867

Closed g-jiannan closed 10 months ago

g-jiannan commented 10 months ago

Fix #866. AccessPathNullnessPropagation#isCallToMethod is not robust and causes java.lang.RuntimeException: expected call to iterator(), instead saw null. As a quick fix, leverage errorprone matchers. No new test case is added because I'm unable to reproduce it easily and NullAwayKeySetIteratorTests already covers the code pattern.

CLAassistant commented 10 months ago

CLA assistant check
All committers have signed the CLA.

g-jiannan commented 10 months ago

@msridhar Would you help to review the pull request? Thanks!

msridhar commented 10 months ago

@g-jiannan see my comment on the issue you opened https://github.com/uber/NullAway/issues/866#issuecomment-1824798959