Use visit with parent cursor when calling from another visitor
MSALWhen calling another visitor from within a visitor, use the generic visit(tree, ctx, getCursor().getParentTreeCursor()) method instead of a specific visit* method like visitMethodInvocation. The specific visit methods bypass the visitor lifecycle, including cursor setup, pre/post visit hooks, and observer notifications.
org. openrewrite. java. recipes. UseVisitWithParentCursormod run . --recipe= org. openrewrite. java. recipes. UseVisitWithParentCursorInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.