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

Propagate more nullability info to lambdas known to be invoked synchronously #952

Closed msridhar closed 5 months ago

msridhar commented 5 months ago

Fixes #941

We propagate full nullability info from the enclosing context to callbacks passed to Map.forEach, Iterable.forEach, List.removeIf, and all methods on java.util.stream.Stream

codecov[bot] commented 5 months ago

Codecov Report

Attention: Patch coverage is 77.14286% with 16 lines in your changes are missing coverage. Please review.

Project coverage is 86.06%. Comparing base (719b167) to head (b8b8078).

Files Patch % Lines
.../nullaway/handlers/SynchronousCallbackHandler.java 83.33% 1 Missing and 6 partials :warning:
...er/nullaway/handlers/OptionalEmptinessHandler.java 14.28% 6 Missing :warning:
...a/com/uber/nullaway/handlers/CompositeHandler.java 77.77% 1 Missing and 1 partial :warning:
...m/uber/nullaway/handlers/AccessPathPredicates.java 66.66% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #952 +/- ## ============================================ - Coverage 86.08% 86.06% -0.02% - Complexity 2018 2032 +14 ============================================ Files 79 81 +2 Lines 6612 6669 +57 Branches 1280 1294 +14 ============================================ + Hits 5692 5740 +48 - Misses 510 516 +6 - Partials 410 413 +3 ```

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