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

Model Lombok-generated equals methods as having a @Nullable parameter #874

Closed msridhar closed 10 months ago

msridhar commented 10 months ago

See the new test in UsesDTO. Without this change, NullAway reports an incorrect warning for this code that passes a @Nullable parameter to a Lombok-generated equals() method.

The real logic change in this PR is very small. Most of the changes are required to make a VisitorState object available in a Handler method.

codecov[bot] commented 10 months ago

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (2f1cf7c) 87.06% compared to head (e178899) 87.03%.

Files Patch % Lines
...java/com/uber/nullaway/handlers/LombokHandler.java 40.00% 2 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #874 +/- ## ============================================ - Coverage 87.06% 87.03% -0.04% - Complexity 1924 1926 +2 ============================================ Files 77 77 Lines 6225 6231 +6 Branches 1209 1212 +3 ============================================ + Hits 5420 5423 +3 - Misses 403 405 +2 - Partials 402 403 +1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.