Remove SecurityManager permission checks

MSAL

The Security Manager API is unsupported in Java 24. This recipe removes calls to the java.lang.SecurityManager#check*(..) methods on the system SecurityManager, and keeps checks on other SecurityManager instances, which still enforce their own policy.

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

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. Remove permission checks on the system SecurityManager
  2. Remove catch for a checked exception if the try block does not throw that exception
  3. Unnecessary throws