Fix Version/s: 11
Compatibility Kind:source, binary
Compatibility Risk Description:Methods long deprecated and long throwing exceptions when called.
Interface Kind:Java API
The Thread.destroy() and Thread.stop(Throwable) APIs will be removed from Java SE.
Thread.destroy() has never been implemented, and has always done nothing more than throwing NoSuchMethodError to the caller. Thread.stop(Throwable) is exceedingly dangerous, and it has been "degraded" since JDK 8 to do nothing more than to throw UnsupportedOperationException to the caller. They have both been deprecated for removal since Java 9.
Remove the APIs from the Thread class. Make minor adjustments to the specifications for JDI, JDWP, and JVMTI to remove or avoid references to the Thread.stop(Throwable) method.
The attached diff contains details of the specification changes. Some changes have Java SE scope whereas some have JDK scope.
- java.lang.Thread.destroy() - removed
- java.lang.Thread.stop(Throwable) - removed
- java/lang/doc-files/threadPrimitiveDeprecation.html - remove sections that mention the above methods
- jdwp.spec - changes to the JDWP wire protocol spec, to remove reference to Thread.stop()
- jvmti.xml - adjustment to the JVMTI specification to refer to the no-arg Thread.stop() method that is not being removed
- com.sun.jdk.ThreadReference.stop() - remove cross-reference to java.lang.Thread.stop(Throwable)