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 JDK 21 case operands in type refinement #928

Merged
merged 5 commits into from
Mar 19, 2024

Conversation

msridhar
Copy link
Collaborator

@msridhar msridhar commented Mar 9, 2024

Fixes #927. We also extract some common logic in AccessPathNullnessPropagation around handling equality comparisons to avoid duplication.

Copy link

codecov bot commented Mar 9, 2024

Codecov Report

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

Project coverage is 87.04%. Comparing base (e3a3c76) to head (02912d9).

Files Patch % Lines
...llaway/dataflow/AccessPathNullnessPropagation.java 90.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master     #928      +/-   ##
============================================
- Coverage     87.07%   87.04%   -0.03%     
+ Complexity     1994     1993       -1     
============================================
  Files            77       77              
  Lines          6444     6440       -4     
  Branches       1249     1249              
============================================
- Hits           5611     5606       -5     
  Misses          422      422              
- Partials        411      412       +1     

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

@msridhar msridhar marked this pull request as ready for review March 10, 2024 16:05
@msridhar msridhar changed the title [WIP] Handle case null in type refinement Handle JDK 21 case operands in type refinement Mar 10, 2024
@msridhar msridhar requested a review from yuxincs March 10, 2024 16:06
Copy link
Collaborator

@yuxincs yuxincs left a comment

Choose a reason for hiding this comment

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

LGTM and nice refactor :)

@msridhar msridhar merged commit 3bde26c into uber:master Mar 19, 2024
12 checks passed
@msridhar msridhar deleted the java-21-switch-case-refinement branch March 19, 2024 17:14
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.

Validation of null in a switch-case with pattern matching does not work as expected.
2 participants