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 methods that fail unconditionally in ContractHandler #946

Merged
merged 6 commits into from Mar 29, 2024

Conversation

msridhar
Copy link
Collaborator

@msridhar msridhar commented Mar 27, 2024

Fixes #943

We extend ContractHandler to insert an unconditional throw into the CFG when encountering a method that fails unconditionally according to its @Contract annotation.

Copy link

codecov bot commented Mar 27, 2024

Codecov Report

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

Project coverage is 87.06%. Comparing base (76f0f77) to head (a794043).

❗ Current head a794043 differs from pull request most recent head b48e7a8. Consider uploading reports for the commit b48e7a8 to get more accurate results

Files Patch % Lines
...uber/nullaway/dataflow/cfg/NullAwayCFGBuilder.java 88.88% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master     #946      +/-   ##
============================================
- Coverage     87.13%   87.06%   -0.07%     
+ Complexity     2011     1995      -16     
============================================
  Files            78       77       -1     
  Lines          6513     6456      -57     
  Branches       1264     1253      -11     
============================================
- Hits           5675     5621      -54     
  Misses          422      422              
+ Partials        416      413       -3     

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

@msridhar msridhar changed the title Handle methods that fail unconditionally Handle methods that fail unconditionally in ContractHandler Mar 27, 2024
@msridhar msridhar marked this pull request as ready for review March 27, 2024 18:25
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.

Nice!!

@msridhar msridhar merged commit 7b8d80c into uber:master Mar 29, 2024
10 checks passed
@msridhar msridhar deleted the issue-943 branch March 29, 2024 14:30
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.

Null if check and failing function to taken in account
2 participants