Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSpecify: initial handling of generic enclosing types for inner classes #837

Merged
merged 10 commits into from Oct 18, 2023

Conversation

msridhar
Copy link
Collaborator

@msridhar msridhar commented Sep 29, 2023

This is a step towards fixing #836. We now properly handle the case of a generic enclosing type for an inner class type, both in checking matching of type argument nullability and in pretty-printing for error messages. We still don't handle NewClassTree types correctly which is why #836 is not yet fixed.

Also fixes a bug in where generics checks were performed for return statements. Previously we would only check generic type arguments if the top-level nullability of the return type was @NonNull.

@codecov
Copy link

codecov bot commented Sep 29, 2023

Codecov Report

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

Comparison is base (e7623f7) 86.85% compared to head (68cccfc) 86.86%.

Additional details and impacted files
@@            Coverage Diff            @@
##             master     #837   +/-   ##
=========================================
  Coverage     86.85%   86.86%           
  Complexity     1879     1879           
=========================================
  Files            74       74           
  Lines          6194     6196    +2     
  Branches       1201     1202    +1     
=========================================
+ Hits           5380     5382    +2     
  Misses          406      406           
  Partials        408      408           
Files Coverage Δ
...away/src/main/java/com/uber/nullaway/NullAway.java 89.73% <100.00%> (ø)
...rc/main/java/com/uber/nullaway/GenericsChecks.java 90.28% <85.36%> (+0.05%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@msridhar msridhar changed the title [WIP] Jspecify nested classes JSpecify: initial handling of generic enclosing types for inner classes Sep 29, 2023
@msridhar msridhar marked this pull request as ready for review September 29, 2023 20:05
@msridhar
Copy link
Collaborator Author

The missing coverage report from @codecov is due to an incorrect computation of what code is actually changing in this diff

Copy link
Collaborator

@lazaroclapp lazaroclapp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Some nits.

@msridhar msridhar enabled auto-merge (squash) October 18, 2023 20:39
@msridhar msridhar merged commit 5355c7c into uber:master Oct 18, 2023
9 of 10 checks passed
@msridhar msridhar deleted the jspecify-nested-classes branch October 18, 2023 20:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants