Avoid using the deprecated methods in java.lang.ThreadGroup

The suspend and resume methods within java.lang.Thread and the suspend, resume, and allowThreadSuspension methods within java.lang.ThreadGroup were deprecated in Java SE 14. Remove the usage of these methods in your application as they are deprecated and will be removed in a future release.

For more information on the Java SE 14 deprecation of these methods, see Terminally deprecate Thread suspend and resume, and terminally deprecate ThreadGroup suspend, resume, and allowThreadSuspension.

The stop, destroy, isDestroyed, setDaemon and isDaemon methods within java.lang.ThreadGroup were deprecated in Java SE 16. Remove the usage of these methods in your application as they are unsafe to use and will be removed in a future release.

For more information on the Java SE 16 deprecation of these methods, see Terminally deprecate ThreadGroup stop, destroy, isDestroyed, setDaemon and isDaemon.