Simplify Arrays.asList(..) with varargs
MSALSimplifies Arrays.asList() method calls that use explicit array creation to use varargs instead. For example, Arrays.asList(new String[]{"a", "b", "c"}) becomes Arrays.asList("a", "b", "c"). Explicitly constructing an array to pass to a varargs parameter adds visual clutter without changing behavior, since the compiler generates the array automatically.
org. openrewrite. staticanalysis. SimplifyArraysAsListmod run . --recipe= org. openrewrite. staticanalysis. SimplifyArraysAsListInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.