JDK-8368237 : Remove Thread.stop
  • Type: CSR
  • Component: core-libs
  • Sub-Component: java.lang
  • Priority: P4
  • Status: Finalized
  • Resolution: Unresolved
  • Fix Versions: 26
  • Submitted: 2025-09-22
  • Updated: 2025-09-23
Related Reports
CSR :  
Description
Summary
-------

Remove `java.lang.Thread.stop()`.


Problem
-------

The no-arg `Thread.stop` method has been deprecated since JDK 1.2, deprecated for removal since JDK 18, and re-specified to throw `UnsupportedOperationException` unconditionally since JDK 20. It is time to finally remove the method.

Solution
--------

Remove `java.lang.Thread.stop()`.

Remove the "Java Thread Primitive Deprecation" page.

Update the specification of `java.lang.ThreadDeath` to not link to `Thread.stop`.

A release note is planned. 

There is follow on docs work (guides, not specs) to ensure that all references to this method are removed.


Specification
-------------

Remove `java.lang.Thread.stop()`.

Change `java.lang.ThreadDeath` as follows:


```
  * An instance of {@code ThreadDeath} was originally specified to be thrown
- * by a victim thread when "stopped" with {@link Thread#stop()}.
+ * by a victim thread when "stopped" with the {@link Thread} API.
  *
- * @deprecated {@link Thread#stop()} was originally specified to "stop" a victim
- *      thread by causing the victim thread to throw a {@code ThreadDeath}. It
- *      was inherently unsafe and deprecated in an early JDK release. The ability
- *      to "stop" a thread with {@code Thread.stop} has been removed and the
- *      {@code Thread.stop} method changed to throw an exception. Consequently,
- *      {@code ThreadDeath} is also deprecated, for removal.
+ * @deprecated {@code Thread} originally specified a "{@code stop}" method to stop a
+ *      victim thread by causing the victim thread to throw a {@code ThreadDeath}. It
+ *      was inherently unsafe and deprecated in an early JDK release. The stop method
+ *      has since been removed and {@code ThreadDeath} is deprecated, for removal.
```