Safely add imports for fully qualified Java type references
Apache 2.0Shorten fully qualified Java type references and add imports when their simple names remain unambiguous. Checks inherited member type names against available source declarations. When that information is unavailable, keeps a type qualified unless an existing simple use in the class body proves its binding. Only changes Java compilation units, skips resource fixtures and generated or evidence sources, and preserves qualification-sensitive Lombok builder annotations and template syntax.
org. openrewrite. java. ShortenFullyQualifiedTypeReferencesSafelymod run . --recipe= org. openrewrite. java. ShortenFullyQualifiedTypeReferencesSafelyInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.