Reorder maybeRemoveImport before maybeAddImport
MSALReorders maybeAddImport and maybeRemoveImport calls so that imports are removed before new imports are added. This ordering prevents potential conflicts when the import being added and the import being removed resolve to the same simple class name.
org. openrewrite. java. recipes. RemoveImportBeforeAddImportmod run . --recipe= org. openrewrite. java. recipes. RemoveImportBeforeAddImportInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.