The ability to "stop" a Thread with the `Thread.stop()` method has been removed in this release. The method has been changed to throw `UnsupportedOperationException`. Stopping a Thread by causing it to throw `java.lang.ThreadDeath` was inherently unsafe. The `stop` method has been deprecated since JDK 1.2 (1998). The corresponding method in `ThreadGroup`, to "stop" a group of threads, was changed to throw `UnsupportedOperationException` in Java 19.
As part of this change, `java.lang.ThreadDeath` has been deprecated, for removal.