Explicit initialization
MSALChecks if any class or object member is explicitly initialized to default for its type value:
nullfor object references- zero for
int,long,shortandchar - and
falseforbooleanRemoves explicit initializations where they aren't necessary. Since the JVM already guarantees these defaults, restating them adds visual noise and can obscure fields that are intentionally initialized to non-default values.
org. openrewrite. staticanalysis. ExplicitInitializationmod run . --recipe= org. openrewrite. staticanalysis. ExplicitInitializationInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.