JDK-8294320 : Release Note: Thread.suspend/resume changed to throw UnsupportedOperationException
  • Type: Sub-task
  • Component: core-libs
  • Sub-Component: java.lang
  • Affected Version: 20
  • Priority: P4
  • Status: Resolved
  • Resolution: Delivered
  • Submitted: 2022-09-24
  • Updated: 2022-09-28
  • Resolved: 2022-09-28
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 20
20Resolved
Description
The ability to suspend or resume a Thread with the `Thread.suspend()` and `Thread.resume()` methods has been removed in this release. The methods have been changed to throw `UnsupportedOperationException`. These methods were inherently deadlock prone and have been deprecated since JDK 1.2 (1998). The corresponding methods in `ThreadGroup`, to suspend or resume a group of threads, were changed to throw `UnsupportedOperationException` in Java 19.