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

Remove unnecessary lambda #1329

Merged
merged 1 commit into from
May 9, 2024
Merged

Remove unnecessary lambda #1329

merged 1 commit into from
May 9, 2024

Conversation

nakulj
Copy link
Contributor

@nakulj nakulj commented May 9, 2024

Description of changes:

Returning a lambda from a helper method or saving it in a constant is unnecessary; prefer to implement the functional interface method directly and use a method reference instead.

https://errorprone.info/bugpattern/UnnecessaryLambda

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Copy link
Contributor

@lucienlu-aws lucienlu-aws left a comment

Choose a reason for hiding this comment

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

LGTM, recommend updating the commit message and PR message to "Remove unnecessary lambda"

@nakulj nakulj changed the title UnnecessaryLambda Remove unnecessary lambda May 9, 2024
@nakulj nakulj merged commit 71f31e0 into awslabs:master May 9, 2024
1 of 2 checks passed
@nakulj nakulj deleted the errorprone branch May 9, 2024 22:23
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