RFR: 8330005: RandomGeneratorFactory.getDefault() throws exception when the runtime image only has java.base module [v6]

Jaikiran Pai jpai at openjdk.org
Wed May 8 06:33:00 UTC 2024


On Sat, 4 May 2024 18:29:25 GMT, Raffaello Giulietti <rgiulietti at openjdk.org> wrote:

>> Move all random generators mandated in package `java.util.random` and currently implemented in module `jdk.random` to module `java.base`, and remove module `jdk.random`.
>
> Raffaello Giulietti has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains seven additional commits since the last revision:
> 
>  - Merge branch 'master' into 8330005
>  - Restrict RandomGenerator service providers to those loadable by the platform class loader.
>  - Typo.
>  - Added @uses javadoc tag for j.u.r.RandomGenerator in java.base.
>  - Terminology changes.
>  - Renamed package jdk.random to jdk.internal.random.
>  - 8330005: RandomGeneratorFactory.getDefault() throws exception when the runtime image only has java.base module

Hello Alan,

> RandomTestCoverage should be testing these APIs but if there are gaps then it would be good to add more tests (separate PR of course)

I missed that test case. It does appear to cover most of these APIs on `RandomGeneratorFactory`. There's a method in that test which even calls `RandomGeneratorFactory.getDefault()` but that doesn't seem to be exercised.

-------------

Marked as reviewed by jpai (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/18932#pullrequestreview-2044738539


More information about the core-libs-dev mailing list