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

allow @Builder annotation in LombokValueToBuilder #470

Merged
merged 2 commits into from
May 2, 2024

Conversation

holgpar
Copy link
Contributor

@holgpar holgpar commented May 1, 2024

@Builder is often used with @Value.
It also works really well with records,
so lets just allow it in the recipe.

What's changed?

LombokValueToBuilder now also transforms value classes which have a @Builder annotation.

What's your motivation?

In our codebase, @Value and @Builder are almost always used together.
Migrating from @Value to record does not require further changes (at least I did not find any examples in our codebase)

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

Anyone you would like to review specifically?

Have you considered any alternatives or workarounds?

Any additional context

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

@builder is often used with @value.
It also works really well with records.
@timtebeek timtebeek self-requested a review May 1, 2024 14:44
@timtebeek timtebeek added the enhancement New feature or request label May 1, 2024
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 extending this recipe to cover cases with builder! Hope that helps you there.

@timtebeek timtebeek merged commit 2d67368 into openrewrite:main May 2, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants