On Sat, 4 May 2024 18:29:25 GMT, Raffaello Giulietti <[email protected]> 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 src/java.base/share/classes/java/util/random/RandomGeneratorFactory.java line 147: > 145: > FactoryMapHolder.class.getModule().addUses(RandomGenerator.class); > 146: return ServiceLoader > 147: .load(RandomGenerator.class, > ClassLoader.getPlatformClassLoader()) SecurityManager is still a supported execution mode so you'll need to get the platform class loader in a privileged block until the SM feature is removed. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/18932#discussion_r1590212532
