Skip to content

Fix multiple issues with NewClassTrees that have enclosing expressions#1191

Merged
msridhar merged 6 commits intomasterfrom
issue-1188
Apr 8, 2025
Merged

Fix multiple issues with NewClassTrees that have enclosing expressions#1191
msridhar merged 6 commits intomasterfrom
issue-1188

Conversation

@msridhar
Copy link
Copy Markdown
Collaborator

@msridhar msridhar commented Apr 6, 2025

Fixes #1188, exactly as suggested in that issue. This both simplifies the code and fixes a false negative with @Nullable enclosing expressions.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 6, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.22%. Comparing base (86febe1) to head (a2b4203).
Report is 1 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1191      +/-   ##
============================================
+ Coverage     88.21%   88.22%   +0.01%     
+ Complexity     2314     2310       -4     
============================================
  Files            88       88              
  Lines          7553     7551       -2     
  Branches       1511     1508       -3     
============================================
- Hits           6663     6662       -1     
  Misses          446      446              
+ Partials        444      443       -1     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (2)

nullaway/src/test/java/com/uber/nullaway/CoreTests.java:1138

  • [nitpick] Consider renaming the test method 'issue1888' to a more descriptive name that reflects its intent, which could help with long-term code readability.
@Test public void issue1888() {

nullaway/src/main/java/com/uber/nullaway/NullAway.java:444

  • [nitpick] The logic for handling the enclosing expression could be refactored into a helper method for improved clarity and maintainability.
ExpressionTree enclosingExpression = tree.getEnclosingExpression();

@msridhar msridhar merged commit d5cb4f1 into master Apr 8, 2025
12 checks passed
@msridhar msridhar deleted the issue-1188 branch April 8, 2025 01:11
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.

outer.new Inner(){} in static method throws IndexOutOfBoundsException

3 participants