Skip to content

Add Lombok Value recipe - #1201

Open
Ouweshs28 wants to merge 1 commit into
openrewrite:mainfrom
Ouweshs28:fix/auto-lombok-value
Open

Add Lombok Value recipe#1201
Ouweshs28 wants to merge 1 commit into
openrewrite:mainfrom
Ouweshs28:fix/auto-lombok-value

Conversation

@Ouweshs28

@Ouweshs28 Ouweshs28 commented Aug 14, 2026

Copy link
Copy Markdown

What's changed?

  • Added UseLombokValue to convert safe immutable value-object boilerplate to Lombok @Value.
  • Registered it in LombokBestPractices and recipes.csv.
  • Added positive and no-change tests for unsafe constructors, incompatible getters, and @Accessors.

What's your motivation?

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

The conservative eligibility checks that preserve constructor/getter API behavior and retain explicit equals, hashCode, and toString implementations.

Anyone you would like to review specifically?

N/A

Have you considered any alternatives or workarounds?

Using individual Lombok annotations was considered, but a dedicated recipe better enforces the full @Value equivalence and safety checks.

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 run ./gradlew build locally, and committed any resulting changes to recipes.csv
  • I've formatted the lines I changed, without reformatting code I didn't touch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

Auto Lombok @Value

1 participant