Skip to content

Add Lombok utility class migration recipe - #1203

Open
Ouweshs28 wants to merge 1 commit into
openrewrite:mainfrom
Ouweshs28:fix/lombok-utility-class
Open

Add Lombok utility class migration recipe#1203
Ouweshs28 wants to merge 1 commit into
openrewrite:mainfrom
Ouweshs28:fix/lombok-utility-class

Conversation

@Ouweshs28

@Ouweshs28 Ouweshs28 commented Aug 14, 2026

Copy link
Copy Markdown

What's changed?

  • Added UseLombokUtilityClass to convert conservative static-only utility classes to Lombok @UtilityClass.
  • Registered the recipe in LombokBestPractices and updated recipes.csv.
  • Added safety checks for constructors, instance members, inheritance, instantiation, constructor method references, non-star static imports, nested-class legality, Lombok configuration, and annotation-name collisions.
  • Added positive and negative recipe coverage.

What's your motivation?

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

The candidate safety criteria and the lombok.config resolution logic. The recipe intentionally skips uncertain cases, including non-star static imports and unresolved imported config files.

Anyone you would like to review specifically?

N/A

Have you considered any alternatives or workarounds?

  • This follows the prior work in openrewrite/rewrite#3306, but reimplements it in this module with the safety concerns raised in that review addressed.

Any additional context

Checklist

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 @UtilityClass

1 participant