JDK-8283683 : Make ThreadLocalRandom a final class
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.util.concurrent
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2022-03-25
  • Updated: 2024-11-08
  • Resolved: 2022-03-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 19
19 b16Fixed
Related Reports
CSR :  
Relates :  
Description
The class java.util.concurrent.ThreadLocalRandom is a public class. However, it has one sole constructor which is private:

private ThreadLocalRandom() {
...
}

This makes it eligible to be marked as final and doing so will also better convey its extensibility.
Comments
A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/7958 Date: 2022-03-25 13:32:21 +0000
08-11-2024

Changeset: 85672667 Author: Jaikiran Pai <jpai@openjdk.org> Date: 2022-03-28 11:07:14 +0000 URL: https://git.openjdk.java.net/jdk/commit/8567266795cd1171f5b353d0e0813e7eeff319c2
28-03-2022

A pull request was submitted for review. URL: https://git.openjdk.java.net/jdk/pull/7958 Date: 2022-03-25 13:32:21 +0000
25-03-2022