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

Improve auto-fixing of unnecessary castToNonNull calls #796

Merged

Conversation

lazaroclapp
Copy link
Collaborator

In particular, this allows removing unnecessary casts where the castToNonNull method is specified by a library model, rather than a CLI argument.

In particular, this allows removing unnecessary casts where the
castToNonNull method is specified by a library model, rather than
a CLI argument.
@coveralls
Copy link

coveralls commented Aug 1, 2023

Pull Request Test Coverage Report for Build #1155

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 25 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.05%) to 93.103%

Files with Coverage Reduction New Missed Lines %
../nullaway/src/main/java/com/uber/nullaway/ErrorBuilder.java 12 87.93%
../nullaway/src/main/java/com/uber/nullaway/NullAway.java 13 95.81%
Totals Coverage Status
Change from base Build #1152: 0.05%
Covered Lines: 5629
Relevant Lines: 6046

💛 - Coveralls

Copy link
Collaborator

@msridhar msridhar left a comment

Choose a reason for hiding this comment

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

Awesome!

@@ -37,7 +38,7 @@ public class NullAwayAutoSuggestTest {

@Rule public TemporaryFolder temporaryFolder = new TemporaryFolder();

private ErrorProneFlags flags;
public ErrorProneFlags flags;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why is this change to public needed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good catch! It isn't, it was from a different try at changing makeTestHelper. Let me change it back.

@lazaroclapp lazaroclapp enabled auto-merge (squash) August 1, 2023 20:45
@lazaroclapp lazaroclapp merged commit b061288 into master Aug 1, 2023
7 checks passed
@msridhar msridhar deleted the lazaro_add_unnecessary_cast_to_non_null_auto_fix branch August 1, 2023 21:08
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.

3 participants