Skip to content

Inline nested visitor class into getVisitor() - #147

Merged
timtebeek merged 1 commit into
mainfrom
tim/inline-nested-visitor-class
Aug 25, 2026
Merged

Inline nested visitor class into getVisitor()#147
timtebeek merged 1 commit into
mainfrom
tim/inline-nested-visitor-class

Conversation

@timtebeek

@timtebeek timtebeek commented Aug 25, 2026

Copy link
Copy Markdown
Member

Declares MigrateRequestConfigVisitor anonymously inside the Preconditions.check(..) call instead of as a named private static nested class, keeping the visitor next to the recipe metadata that configures it.

  • The InlineNestedVisitorClass recipe deliberately does not touch precondition-wrapped visitors yet — inlining a large one under Preconditions.check(..) can hurt readability, so it is only applied here where the visitor is small enough (~70 lines) for the tradeoff to be worth it. The pattern is left alone in the other repos for now.

Beyond the class declaration the diff is a pure re-indent; ./gradlew build passes.

Declare the visitor anonymously inside the `Preconditions.check(..)`
call rather than as a named nested class.
@github-project-automation github-project-automation Bot moved this to In Progress in OpenRewrite Aug 25, 2026
@timtebeek
timtebeek merged commit 34d91bb into main Aug 25, 2026
1 check passed
@timtebeek
timtebeek deleted the tim/inline-nested-visitor-class branch August 25, 2026 17:49
@github-project-automation github-project-automation Bot moved this from In Progress to Done in OpenRewrite Aug 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

1 participant