JDK-8332086 : Remove the usage of ServiceLoader in j.u.r.RandomGeneratorFactory
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.util
  • Affected Version: 17
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2024-05-10
  • Updated: 2024-05-27
  • Resolved: 2024-05-21
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 23
23 b24Fixed
Related Reports
CSR :  
Relates :  
Relates :  
Sub Tasks
JDK-8332132 :  
Description
While RandomGeneratorFactory makes internal use of ServiceLoader, there was never an intent to allow non-platform implementations of j.u.r.RandomGenerator to participate in the discovery and lookup as exposed by RandomGeneratorFactory.all(), RandomGeneratorFactory.of() and RandomGenerator.of().

The internal usage of ServiceLoader has some unintended drawbacks (JDK-8331223). To overcome them, the implementation can be simplified by removing ServiceLoader from RandomGeneratorFactory.

Also see JDK-8330005 for preliminary work.
Comments
Changeset: 42e3c842 Author: Raffaello Giulietti <rgiulietti@openjdk.org> Date: 2024-05-21 12:53:03 +0000 URL: https://git.openjdk.org/jdk/commit/42e3c842ae2684265c794868fc76eb0ff2dea3d9
21-05-2024

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/19212 Date: 2024-05-13 08:47:50 +0000
13-05-2024