Change java.lang.reflect.Modifier and java.lang.invoke.ConstantBootstraps method calls to static

MSAL

The java.lang.reflect.Modifier() and java.lang.invoke.ConstantBootstraps() constructors have been removed in Java SE 15 because both classes only contain static methods. This recipe converts the usage of all methods in the two classes to be static. See https://docs.oracle.com/en/java/javase/15/migrate/index.html#GUID-233853B8-0782-429E-BEF7-7532EE610E63 for more information on these changes.

org.openrewrite.java.migrate.RemovedModifierAndConstantBootstrapsConstructors
mod run . --recipe=org.openrewrite.java.migrate.RemovedModifierAndConstantBootstrapsConstructors

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.

Recipe list

It runs these recipes, in this order.

  1. Change method target to static
  2. Change method target to static