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

Replace anonymous classes creation with lambdas in tests #2766

Conversation

panic08
Copy link
Contributor

@panic08 panic08 commented Oct 17, 2024

This change will reduce the amount of code in the tests and simplify it in places where the method implementation is too small, such as:

        new FieldNamingStrategy() {
          @Override
          public String translateName(Field f) {
            return "test";
          }
        }

can be replaced by:
f -> “test”

Replace anonymous classes with lambdas in tests
@panic08 panic08 force-pushed the replace-anonymous-classes-with-lambdas-in-tests branch from 26f9e35 to cbf430e Compare October 17, 2024 19:25
Copy link
Member

@eamonnmcmanus eamonnmcmanus left a comment

Choose a reason for hiding this comment

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

Thanks, that's a big improvement in readability!

@eamonnmcmanus eamonnmcmanus merged commit 73768be into google:main Oct 18, 2024
11 checks passed
@panic08 panic08 deleted the replace-anonymous-classes-with-lambdas-in-tests branch October 18, 2024 14:50
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.

2 participants