Re: RFR: 8332086: Remove the usage of ServiceLoader in j.u.r.RandomGeneratorFactory [v8]

2024-05-21 Thread Jaikiran Pai
On Tue, 21 May 2024 09:06:16 GMT, Raffaello Giulietti wrote: >> All random number generator algorithms are implemented in module >> `java.base`. The usage of `ServiceLoader` in `j.u.r.RandomGeneratorFactory` >> is no longer needed. > > Raffaello Giulietti has updated the pull request

Re: RFR: 8332086: Remove the usage of ServiceLoader in j.u.r.RandomGeneratorFactory [v8]

2024-05-21 Thread Raffaello Giulietti
> All random number generator algorithms are implemented in module `java.base`. > The usage of `ServiceLoader` in `j.u.r.RandomGeneratorFactory` is no longer > needed. Raffaello Giulietti has updated the pull request incrementally with one additional commit since the last revision: Prefer

Re: RFR: 8332086: Remove the usage of ServiceLoader in j.u.r.RandomGeneratorFactory [v7]

2024-05-20 Thread Joe Darcy
On Fri, 17 May 2024 08:28:15 GMT, Raffaello Giulietti wrote: >> All random number generator algorithms are implemented in module >> `java.base`. The usage of `ServiceLoader` in `j.u.r.RandomGeneratorFactory` >> is no longer needed. > > Raffaello Giulietti has updated the pull request

Re: RFR: 8332086: Remove the usage of ServiceLoader in j.u.r.RandomGeneratorFactory [v7]

2024-05-17 Thread Jaikiran Pai
On Fri, 17 May 2024 08:28:15 GMT, Raffaello Giulietti wrote: >> All random number generator algorithms are implemented in module >> `java.base`. The usage of `ServiceLoader` in `j.u.r.RandomGeneratorFactory` >> is no longer needed. > > Raffaello Giulietti has updated the pull request

Re: RFR: 8332086: Remove the usage of ServiceLoader in j.u.r.RandomGeneratorFactory [v5]

2024-05-17 Thread Jaikiran Pai
On Thu, 16 May 2024 13:23:14 GMT, Raffaello Giulietti wrote: >> Yes, I thought about this the other day but decided for a bit more >> conservative approach, relying on the annotation. >> >> But I agree that, since the meta-information now resides in >> `RandomGeneratorProperties`, we might

Re: RFR: 8332086: Remove the usage of ServiceLoader in j.u.r.RandomGeneratorFactory [v7]

2024-05-17 Thread Raffaello Giulietti
> All random number generator algorithms are implemented in module `java.base`. > The usage of `ServiceLoader` in `j.u.r.RandomGeneratorFactory` is no longer > needed. Raffaello Giulietti has updated the pull request incrementally with one additional commit since the last revision:

Re: RFR: 8332086: Remove the usage of ServiceLoader in j.u.r.RandomGeneratorFactory [v5]

2024-05-16 Thread Raffaello Giulietti
On Thu, 16 May 2024 12:35:22 GMT, Raffaello Giulietti wrote: >> src/java.base/share/classes/java/util/random/RandomGeneratorFactory.java >> line 204: >> >>> 202: new RandomGeneratorProperties(rgClass, name, group, >>> 203: i, j, k,

Re: RFR: 8332086: Remove the usage of ServiceLoader in j.u.r.RandomGeneratorFactory [v6]

2024-05-16 Thread Raffaello Giulietti
> All random number generator algorithms are implemented in module `java.base`. > The usage of `ServiceLoader` in `j.u.r.RandomGeneratorFactory` is no longer > needed. Raffaello Giulietti has updated the pull request incrementally with one additional commit since the last revision: Rely on

Re: RFR: 8332086: Remove the usage of ServiceLoader in j.u.r.RandomGeneratorFactory [v5]

2024-05-16 Thread Raffaello Giulietti
On Thu, 16 May 2024 10:51:14 GMT, Jaikiran Pai wrote: >> Raffaello Giulietti has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Small documentation changes. > > test/jdk/java/util/Random/RandomTestCoverage.java line 179: > >> 177:

Re: RFR: 8332086: Remove the usage of ServiceLoader in j.u.r.RandomGeneratorFactory [v5]

2024-05-16 Thread Raffaello Giulietti
On Thu, 16 May 2024 10:33:55 GMT, Jaikiran Pai wrote: >> Raffaello Giulietti has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Small documentation changes. > > src/java.base/share/classes/java/util/random/RandomGeneratorFactory.java line

Re: RFR: 8332086: Remove the usage of ServiceLoader in j.u.r.RandomGeneratorFactory [v5]

2024-05-16 Thread Jaikiran Pai
On Wed, 15 May 2024 09:51:23 GMT, Raffaello Giulietti wrote: >> All random number generator algorithms are implemented in module >> `java.base`. The usage of `ServiceLoader` in `j.u.r.RandomGeneratorFactory` >> is no longer needed. > > Raffaello Giulietti has updated the pull request

Re: RFR: 8332086: Remove the usage of ServiceLoader in j.u.r.RandomGeneratorFactory [v5]

2024-05-16 Thread Jaikiran Pai
On Wed, 15 May 2024 09:51:23 GMT, Raffaello Giulietti wrote: >> All random number generator algorithms are implemented in module >> `java.base`. The usage of `ServiceLoader` in `j.u.r.RandomGeneratorFactory` >> is no longer needed. > > Raffaello Giulietti has updated the pull request

Re: RFR: 8332086: Remove the usage of ServiceLoader in j.u.r.RandomGeneratorFactory [v5]

2024-05-16 Thread Jaikiran Pai
On Wed, 15 May 2024 09:51:23 GMT, Raffaello Giulietti wrote: >> All random number generator algorithms are implemented in module >> `java.base`. The usage of `ServiceLoader` in `j.u.r.RandomGeneratorFactory` >> is no longer needed. > > Raffaello Giulietti has updated the pull request

Re: RFR: 8332086: Remove the usage of ServiceLoader in j.u.r.RandomGeneratorFactory [v5]

2024-05-15 Thread Raffaello Giulietti
> All random number generator algorithms are implemented in module `java.base`. > The usage of `ServiceLoader` in `j.u.r.RandomGeneratorFactory` is no longer > needed. Raffaello Giulietti has updated the pull request incrementally with one additional commit since the last revision: Small

Re: RFR: 8332086: Remove the usage of ServiceLoader in j.u.r.RandomGeneratorFactory [v4]

2024-05-15 Thread Jaikiran Pai
On Tue, 14 May 2024 16:08:22 GMT, Raffaello Giulietti wrote: >> All random number generator algorithms are implemented in module >> `java.base`. The usage of `ServiceLoader` in `j.u.r.RandomGeneratorFactory` >> is no longer needed. > > Raffaello Giulietti has updated the pull request

Re: RFR: 8332086: Remove the usage of ServiceLoader in j.u.r.RandomGeneratorFactory [v4]

2024-05-15 Thread Jaikiran Pai
On Wed, 15 May 2024 06:30:35 GMT, Jaikiran Pai wrote: >> Raffaello Giulietti has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Replace SimpleImmutableEntry constructor with Map.entry() factory method. > >

Re: RFR: 8332086: Remove the usage of ServiceLoader in j.u.r.RandomGeneratorFactory [v4]

2024-05-15 Thread Jaikiran Pai
On Tue, 14 May 2024 16:08:22 GMT, Raffaello Giulietti wrote: >> All random number generator algorithms are implemented in module >> `java.base`. The usage of `ServiceLoader` in `j.u.r.RandomGeneratorFactory` >> is no longer needed. > > Raffaello Giulietti has updated the pull request

Re: RFR: 8332086: Remove the usage of ServiceLoader in j.u.r.RandomGeneratorFactory [v3]

2024-05-14 Thread Raffaello Giulietti
On Tue, 14 May 2024 15:40:24 GMT, ExE Boss wrote: >> Raffaello Giulietti has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Move mathematical logic to record RandomGeneratorProperties. > >

Re: RFR: 8332086: Remove the usage of ServiceLoader in j.u.r.RandomGeneratorFactory [v4]

2024-05-14 Thread Raffaello Giulietti
> All random number generator algorithms are implemented in module `java.base`. > The usage of `ServiceLoader` in `j.u.r.RandomGeneratorFactory` is no longer > needed. Raffaello Giulietti has updated the pull request incrementally with one additional commit since the last revision: Replace

Re: RFR: 8332086: Remove the usage of ServiceLoader in j.u.r.RandomGeneratorFactory [v3]

2024-05-14 Thread ExE Boss
On Tue, 14 May 2024 13:47:33 GMT, Raffaello Giulietti wrote: >> All random number generator algorithms are implemented in module >> `java.base`. The usage of `ServiceLoader` in `j.u.r.RandomGeneratorFactory` >> is no longer needed. > > Raffaello Giulietti has updated the pull request

Re: RFR: 8332086: Remove the usage of ServiceLoader in j.u.r.RandomGeneratorFactory [v3]

2024-05-14 Thread Raffaello Giulietti
> All random number generator algorithms are implemented in module `java.base`. > The usage of `ServiceLoader` in `j.u.r.RandomGeneratorFactory` is no longer > needed. Raffaello Giulietti has updated the pull request incrementally with one additional commit since the last revision: Move

Re: RFR: 8332086: Remove the usage of ServiceLoader in j.u.r.RandomGeneratorFactory [v2]

2024-05-14 Thread Raffaello Giulietti
> All random number generator algorithms are implemented in module `java.base`. > The usage of `ServiceLoader` in `j.u.r.RandomGeneratorFactory` is no longer > needed. Raffaello Giulietti has updated the pull request incrementally with one additional commit since the last revision: Replaced

Re: RFR: 8332086: Remove the usage of ServiceLoader in j.u.r.RandomGeneratorFactory

2024-05-14 Thread Raffaello Giulietti
On Tue, 14 May 2024 11:19:36 GMT, Daniel Fuchs wrote: >> @dfuch You mean not loading the whole batch but only individual classes, as >> need arises? > > yes - I do not know if loading all the classes in one batch could be an issue > at startup (I'd expect Random to be loaded early) - but if it

Re: RFR: 8332086: Remove the usage of ServiceLoader in j.u.r.RandomGeneratorFactory

2024-05-14 Thread Daniel Fuchs
On Mon, 13 May 2024 17:12:33 GMT, Raffaello Giulietti wrote: >> Not sure if that's an issue - but if you wanted/needed to delay the loading >> of those random generator classes that will not be used until something >> actually wants to use them, you could consider using a `Supplier> extends

Re: RFR: 8332086: Remove the usage of ServiceLoader in j.u.r.RandomGeneratorFactory

2024-05-13 Thread Raffaello Giulietti
On Mon, 13 May 2024 14:52:45 GMT, Daniel Fuchs wrote: >> Fine with me. > > Not sure if that's an issue - but if you wanted/needed to delay the loading > of those random generator classes that will not be used until something > actually wants to use them, you could consider using a `Supplier

Re: RFR: 8332086: Remove the usage of ServiceLoader in j.u.r.RandomGeneratorFactory

2024-05-13 Thread Daniel Fuchs
On Mon, 13 May 2024 13:21:23 GMT, Raffaello Giulietti wrote: >> A followup PR is fine. I think once this PR which addresses the API aspects >> (like removal of ServiceLoader and then updates to the create() method >> javadoc) is integrated, then the subsequent PR can just be all internal >>

Re: RFR: 8332086: Remove the usage of ServiceLoader in j.u.r.RandomGeneratorFactory

2024-05-13 Thread Raffaello Giulietti
On Mon, 13 May 2024 14:08:01 GMT, Jaikiran Pai wrote: >> Then I would even remove the double-checking idiom, the `volatile` on `ctor` >> and `properties`, and declare methods `getProperties()` and >> `ensureConstructors()` as `synchronized`. >> I'm not sure that the double-checking

Re: RFR: 8332086: Remove the usage of ServiceLoader in j.u.r.RandomGeneratorFactory

2024-05-13 Thread Jaikiran Pai
On Mon, 13 May 2024 13:54:18 GMT, Raffaello Giulietti wrote: > Then I would even remove the double-checking idiom, the volatile on ctor and > properties, and declare methods getProperties() and ensureConstructors() as > synchronized. > I'm not sure that the double-checking optimization brings

Re: RFR: 8332086: Remove the usage of ServiceLoader in j.u.r.RandomGeneratorFactory

2024-05-13 Thread Raffaello Giulietti
On Mon, 13 May 2024 13:41:50 GMT, Jaikiran Pai wrote: >> All random number generator algorithms are implemented in module >> `java.base`. The usage of `ServiceLoader` in `j.u.r.RandomGeneratorFactory` >> is no longer needed. > >

Re: RFR: 8332086: Remove the usage of ServiceLoader in j.u.r.RandomGeneratorFactory

2024-05-13 Thread Jaikiran Pai
On Mon, 13 May 2024 08:47:50 GMT, Raffaello Giulietti wrote: > All random number generator algorithms are implemented in module `java.base`. > The usage of `ServiceLoader` in `j.u.r.RandomGeneratorFactory` is no longer > needed.

Re: RFR: 8332086: Remove the usage of ServiceLoader in j.u.r.RandomGeneratorFactory

2024-05-13 Thread Jaikiran Pai
On Mon, 13 May 2024 08:47:50 GMT, Raffaello Giulietti wrote: > All random number generator algorithms are implemented in module `java.base`. > The usage of `ServiceLoader` in `j.u.r.RandomGeneratorFactory` is no longer > needed.

Re: RFR: 8332086: Remove the usage of ServiceLoader in j.u.r.RandomGeneratorFactory

2024-05-13 Thread Raffaello Giulietti
On Mon, 13 May 2024 13:18:24 GMT, Jaikiran Pai wrote: >> @jaikiran I agree that we can simplify even more. I just wanted to change as >> little as possible in this PR to facilitate reviews. >> Shall I push your proposed changes in this PR or is a followup PR preferable? > > A followup PR is

Re: RFR: 8332086: Remove the usage of ServiceLoader in j.u.r.RandomGeneratorFactory

2024-05-13 Thread Jaikiran Pai
On Mon, 13 May 2024 13:14:57 GMT, Raffaello Giulietti wrote: >> Thinking a bit more, I think we can even get rid of the reflection used in >> `create()` methods implementation, if we wanted to, by doing something like >> this: >> >> >> private record RandomGenEntry(Class >> randomGenClass,

Re: RFR: 8332086: Remove the usage of ServiceLoader in j.u.r.RandomGeneratorFactory

2024-05-13 Thread Raffaello Giulietti
On Mon, 13 May 2024 13:06:04 GMT, Jaikiran Pai wrote: >> src/java.base/share/classes/java/util/random/RandomGeneratorFactory.java >> line 190: >> >>> 188: if (properties == null) { // double-checking idiom >>> 189: RandomGeneratorProperties props = >>>

Re: RFR: 8332086: Remove the usage of ServiceLoader in j.u.r.RandomGeneratorFactory

2024-05-13 Thread Jaikiran Pai
On Mon, 13 May 2024 12:45:59 GMT, Jaikiran Pai wrote: >> All random number generator algorithms are implemented in module >> `java.base`. The usage of `ServiceLoader` in `j.u.r.RandomGeneratorFactory` >> is no longer needed. > >

Re: RFR: 8332086: Remove the usage of ServiceLoader in j.u.r.RandomGeneratorFactory

2024-05-13 Thread Jaikiran Pai
On Mon, 13 May 2024 08:47:50 GMT, Raffaello Giulietti wrote: > All random number generator algorithms are implemented in module `java.base`. > The usage of `ServiceLoader` in `j.u.r.RandomGeneratorFactory` is no longer > needed.

Re: RFR: 8332086: Remove the usage of ServiceLoader in j.u.r.RandomGeneratorFactory

2024-05-13 Thread Raffaello Giulietti
On Mon, 13 May 2024 08:47:50 GMT, Raffaello Giulietti wrote: > All random number generator algorithms are implemented in module `java.base`. > The usage of `ServiceLoader` in `j.u.r.RandomGeneratorFactory` is no longer > needed. This is a followup of

RFR: 8332086: Remove the usage of ServiceLoader in j.u.r.RandomGeneratorFactory

2024-05-13 Thread Raffaello Giulietti
All random number generator algorithms are implemented in module `java.base`. The usage of `ServiceLoader` in `j.u.r.RandomGeneratorFactory` is no longer needed. - Commit messages: - 8332086: Remove the usage of ServiceLoader in j.u.r.RandomGeneratorFactory Changes: