Replace Thread.resume(), Thread.stop(), and Thread.suspend() with throw new UnsupportedOperationException()
MSALThread.resume(), Thread.stop(), and Thread.suspend() always throw an UnsupportedOperationException in Java 21+. This recipe makes that explicit, and adds a comment pointing to the migration guide, as the migration is more complicated. On earlier Java versions only the comment is added.
org. openrewrite. java. migrate. lang. ThreadStopUnsupportedmod run . --recipe= org. openrewrite. java. migrate. lang. ThreadStopUnsupportedInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.