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

Handle calls to generic constructors in JSpecify mode #1141

Merged
merged 4 commits into from
Feb 3, 2025
Merged

Conversation

msridhar
Copy link
Collaborator

Fixes #1138

@msridhar msridhar changed the title Handle calls to generic constructors Handle calls to generic constructors in JSpecify mode Jan 31, 2025
Copy link

codecov bot commented Jan 31, 2025

Codecov Report

Attention: Patch coverage is 75.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 88.24%. Comparing base (18a0a68) to head (f98df4e).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
...ava/com/uber/nullaway/generics/GenericsChecks.java 75.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1141      +/-   ##
============================================
- Coverage     88.24%   88.24%   -0.01%     
- Complexity     2261     2263       +2     
============================================
  Files            85       85              
  Lines          7309     7314       +5     
  Branches       1458     1458              
============================================
+ Hits           6450     6454       +4     
- Misses          431      432       +1     
  Partials        428      428              

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

break;
default:
throw new RuntimeException("Unexpected tree kind: " + tree.getKind());
}
if (typeArguments.isEmpty()) {
return;
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Below on line 178 don't you again need to handle the case where the tree.getKind() could be a NEW_CLASS?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good catch! Will fix

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Now have new tests that exercise the rest of the method for the NEW_CLASS case

@msridhar msridhar requested a review from akshayutture February 1, 2025 17:08
@msridhar
Copy link
Collaborator Author

msridhar commented Feb 1, 2025

@akshayutture this is ready for another look

@akshayutture
Copy link
Collaborator

LGTM!

@msridhar msridhar merged commit f064222 into master Feb 3, 2025
11 of 12 checks passed
@msridhar msridhar deleted the issue-1138 branch February 3, 2025 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants