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

Track access paths of the form Foo.this.bar #937

Merged
merged 1 commit into from
Mar 22, 2024

Conversation

msridhar
Copy link
Collaborator

Fixes #936

We add limited tracking of such access paths, to handle null checks on fields from an enclosing class of a nested class.

@msridhar msridhar requested a review from yuxincs March 22, 2024 19:14
@msridhar
Copy link
Collaborator Author

/benchmark

Copy link

codecov bot commented Mar 22, 2024

Codecov Report

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

Project coverage is 87.04%. Comparing base (3bde26c) to head (3c8ff10).

Files Patch % Lines
...in/java/com/uber/nullaway/dataflow/AccessPath.java 85.71% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master     #937      +/-   ##
============================================
- Coverage     87.04%   87.04%   -0.01%     
- Complexity     1993     1995       +2     
============================================
  Files            77       77              
  Lines          6440     6447       +7     
  Branches       1249     1252       +3     
============================================
+ Hits           5606     5612       +6     
  Misses          422      422              
- Partials        412      413       +1     

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

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!

Copy link

Main Branch:

Benchmark                          Mode  Cnt   Score   Error  Units
AutodisposeBenchmark.compile      thrpt   25   9.212 ± 0.074  ops/s
CaffeineBenchmark.compile         thrpt   25   2.122 ± 0.023  ops/s
DFlowMicroBenchmark.compile       thrpt   25  25.144 ± 0.348  ops/s
NullawayReleaseBenchmark.compile  thrpt   25   1.283 ± 0.020  ops/s

With This PR:

Benchmark                          Mode  Cnt   Score   Error  Units
AutodisposeBenchmark.compile      thrpt   25   9.264 ± 0.093  ops/s
CaffeineBenchmark.compile         thrpt   25   2.120 ± 0.025  ops/s
DFlowMicroBenchmark.compile       thrpt   25  24.611 ± 0.319  ops/s
NullawayReleaseBenchmark.compile  thrpt   25   1.271 ± 0.018  ops/s

@msridhar msridhar merged commit 5bedf0a into uber:master Mar 22, 2024
10 of 12 checks passed
@msridhar msridhar deleted the issue-936 branch March 22, 2024 21:34
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.

if (Foo.this.bar != null) in nested class not properly analyzed
2 participants