JDK-8288416 : Release Note: Source and Binary Incompatible Changes to java.lang.Thread
  • Type: Sub-task
  • Component: core-libs
  • Sub-Component: java.lang
  • Affected Version: 19
  • Priority: P4
  • Status: Resolved
  • Resolution: Delivered
  • Submitted: 2022-06-14
  • Updated: 2023-08-28
  • Resolved: 2022-08-03
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 19
19Resolved
Related Reports
Relates :  
Description
The are a few source and binary incompatible changes that may impact code that extends `java.lang.Thread`. 

- `Thread` defines several new methods in this release. If code in an existing source file extends `Thread` and a method in the subclass conflicts with any of the new `Thread` methods then the file will not compile without change. 

- `Thread.Builder` is added as a nested interface. If code in an existing source file extends `Thread`, imports a class named `Builder`, and code in the subclass references "Builder" as a simple name, then the file will not compile without change. 

- `Thread.isVirtual()`, `Thread.threadId()`  and `Thread.join(Duration)` are added as final methods. If there is existing compiled code that extends `Thread` and the subclass declares a method with the same name, parameters, and return type as any of these methods then `IncompatibleClassChangeError` will be thrown at run-time if the subclass is loaded.

For further details, see the [JEP 425, section java.lang.Thread](https://openjdk.java.net/jeps/425#java-lang-Thread).