Skip to content

Conversation

@msridhar
Copy link
Collaborator

In particular, fix cases where the type of a method parameter either contains generic type arguments or is itself a type variable. These fixes are needed for #1072.

We take advantage of the fact that even though javac erases generics, it stores full generic type signatures in class file attributes, which WALA is able to read. So we can recover generic type information from these attributes. We needed a bug fix from WALA for this to work, hence the WALA version bump.

Not every case is supported here (e.g., we haven't tested generic methods). But these changes are enough to enable #1072 to move forward, after which we will have a single place to add features and fix bugs.

@codecov
Copy link

codecov bot commented Nov 22, 2024

Codecov Report

Attention: Patch coverage is 93.18182% with 3 lines in your changes missing coverage. Please review.

Project coverage is 87.99%. Comparing base (933b1af) to head (9b1e071).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
...llaway/jarinfer/DefinitelyDerefedParamsDriver.java 95.00% 2 Missing ⚠️
...er/nullaway/handlers/InferredJARModelsHandler.java 75.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1078      +/-   ##
============================================
+ Coverage     87.96%   87.99%   +0.02%     
- Complexity     2222     2228       +6     
============================================
  Files            85       85              
  Lines          7197     7220      +23     
  Branches       1427     1432       +5     
============================================
+ Hits           6331     6353      +22     
- Misses          437      438       +1     
  Partials        429      429              

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

@msridhar msridhar enabled auto-merge (squash) December 12, 2024 20:52
@msridhar msridhar merged commit 35279f0 into uber:master Dec 12, 2024
11 checks passed
@msridhar msridhar deleted the jarinfer-generics-in-signature branch December 12, 2024 21:02
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.

2 participants