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

Fix IndexOutOfBoundsException in EqualsAvoidsNull recipe #394

Merged
merged 1 commit into from
Nov 25, 2024

Conversation

ggerbaud
Copy link
Contributor

@ggerbaud ggerbaud commented Nov 25, 2024

What's changed?

Check that collection is not empty before getting the first element, as might happen when recipes are chained together.

What's your motivation?

Anything in particular you'd like reviewers to focus on?

just the one line

Checklist

  • I've added unit tests to cover both positive and negative cases
  • I've read and applied the recipe conventions and best practices
  • I've used the IntelliJ IDEA auto-formatter on affected files

Copy link
Contributor

@timtebeek timtebeek left a comment

Choose a reason for hiding this comment

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

Thanks for the analysis and quick fix here @ggerbaud ! Much appreciated.

@timtebeek timtebeek added the bug Something isn't working label Nov 25, 2024
@timtebeek timtebeek merged commit 8606477 into openrewrite:main Nov 25, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants