Skip to content

Fix Lombok setter names for boolean is-prefixed fields - #1445

Open
kubaluzak wants to merge 1 commit into
openrewrite:mainfrom
kubaluzak:fix/lombok-boolean-setter-name
Open

kubaluzak wants to merge 1 commit into
openrewrite:mainfrom
kubaluzak:fix/lombok-boolean-setter-name

Conversation

@kubaluzak

@kubaluzak kubaluzak commented Nov 9, 2026 •

Copy link
Copy Markdown

What's changed?

  • Corrected Lombok setter name derivation for primitive boolean fields whose names start with is followed by an uppercase letter.
  • Reused the corrected derivation in UseLombokSetter and AdoptLombokSetterMethodNames.
  • Added positive and negative regression tests.

What's your motivation?

For a primitive boolean field named isFoo, Lombok generates setFoo().
The recipes previously expected setIsFoo(), which could remove or rename the wrong method and break existing callers.

Refs #1330 (F2)

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

Please confirm that handling the primitive boolean isFoo case in the shared setter-name helper is the preferred approach.

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 formatted the lines I changed, without reformatting code I didn't touch

@github-project-automation github-project-automation Bot moved this to In Progress in OpenRewrite Nov 9, 2026
@kubaluzak
kubaluzak marked this pull request as ready for review November 10, 2026 00:02
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.

1 participant