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

Adding support for nullable type upper bounds considering Library mod… #893

Closed akulk022 closed 8 months ago

akulk022 commented 9 months ago

The below line previously reported an error considering the upperbound of the generic type parameter couldn't be Nullable, adding it into library models to allow it to be Nullable passes the test case.

Function<String,@Nullable String> removeA = a -> a.replace("a","");
codecov[bot] commented 9 months ago

Codecov Report

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

Comparison is base (c1eb8ca) 86.95% compared to head (f6996d1) 87.07%. Report is 5 commits behind head on master.

Files Patch % Lines
...away/src/main/java/com/uber/nullaway/NullAway.java 90.00% 0 Missing and 3 partials :warning:
...ava/com/uber/nullaway/generics/GenericsChecks.java 85.71% 0 Missing and 3 partials :warning:
...src/main/java/com/uber/nullaway/LibraryModels.java 66.66% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #893 +/- ## ============================================ + Coverage 86.95% 87.07% +0.12% - Complexity 1953 1981 +28 ============================================ Files 77 77 Lines 6315 6385 +70 Branches 1222 1239 +17 ============================================ + Hits 5491 5560 +69 + Misses 420 419 -1 - Partials 404 406 +2 ```

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