Do not use the removed java.lang.Thread.destroy() or java.lang.Thread.stop(java.lang.Throwable) methods

This rule flags java.lang.Thread.destroy() and java.lang.Thread.stop(java.lang.Throwable) method invocations. The java.lang.Thread.destroy() method was never implemented, and the java.lang.Thread.stop(java.lang.Throwable) method has been unusable since Java SE 8. No code should rely on the behavior of these two methods. Remove any references to these methods from the source code.

Note that the java.lang.Thread.stop() method with no arguments is deprecated, but not removed.

Instead of using the stop method, you can control thread stopping by using a variable. For more information, see Java Thread Primitive Deprecation.

This rule has an automated fix. The fix removes Thread.destroy() and Thread.stop(Throwable). Copy the custom configuration to your application build file to enable the fix automation.

For additional information about the java.lang.Thread class, see the Class java.lang.Thread Java documentation.

For more information on changes in JDK 11, see Removed APIs in JDK 11.