Fix Version/s: 14
Compatibility Risk Description:The deprecation warning changes so a project compiling with `-Xlint:all,-deprecation -Werror` today will need to change to use `-removal`.
Interface Kind:Java API
Deprecate, for removal, the methods in
java.lang.ThreadGroup that relate to thread suspension, specifically:
These methods have been deprecated since Java SE 1.2 (1998).
Suspension is inherently deadlock-prone, these APIs have linked to the "Java Thread Primitive Deprecation" page since they were deprecated.
A second issue is that Project Loom is exploring adding support for "lightweight threads" where the notion of suspension will be very different to that defined by the legacy thread suspension mechanism.
Add "forRemoval=true" to the
Deprecated annotation on these methods.
No deprecation or changes are proposed to the equivalent APIs in JVM TI or JDI as these are important for debugger operations.
The addition of "forRemoval=true" will result in the API docs including a removal warning in the "Deprecated" message.