openrewrite / rewrite-migrate-java

OpenRewrite recipes for migrating to newer versions of Java.
Apache License 2.0
92 stars 65 forks source link

allow @Builder annotation in LombokValueToBuilder #470

Closed holgpar closed 2 months ago

holgpar commented 2 months ago

@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