Find main methods with a throws clause
MSALMarks JVM entry-point main methods (public static void main(String[]) or the varargs equivalent) that declare a throws clause. Uncaught exceptions from main propagate to the JVM's default handler, which just prints the stack trace and returns exit code 1. Handle exceptions explicitly and exit with a meaningful code.
org. openrewrite. staticanalysis. FindMainWithThrowsClausemod run . --recipe= org. openrewrite. staticanalysis. FindMainWithThrowsClauseInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.