uber / NullAway

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

JSpecify: read upper bound annotations from bytecode and add tests #1004

Closed msridhar closed 1 month ago

msridhar commented 1 month ago

We add support for reading upper bound annotations from bytecodes for JSpecify mode generics checks. Many more types of annotations need to be read with special handling on JDK versions earlier than 22, due to https://bugs.openjdk.org/browse/JDK-8225377. For now, we disable some tests on earlier JDKs. We may add this special handling in the future, but it will be a significant amount of work. We are still hoping the relevant javac fix gets backported, which will fix this for us; see https://github.com/jspecify/jspecify/issues/365.

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 96.29630% with 1 line in your changes missing coverage. Please review.

Project coverage is 85.97%. Comparing base (43bbb79) to head (8b61b6a).

Files Patch % Lines
...ava/com/uber/nullaway/generics/GenericsChecks.java 96.29% 0 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1004 +/- ## ============================================ + Coverage 85.95% 85.97% +0.01% - Complexity 2073 2078 +5 ============================================ Files 83 83 Lines 6873 6889 +16 Branches 1322 1326 +4 ============================================ + Hits 5908 5923 +15 Misses 551 551 - Partials 414 415 +1 ```

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