RFR: 8248862: Implement Enhanced Pseudo-Random Number Generators [v3]
Jim Laskey
jlaskey at openjdk.java.net
Mon Nov 23 15:20:13 UTC 2020
On Tue, 17 Nov 2020 23:46:12 GMT, Paul Sandoz <psandoz at openjdk.org> wrote:
>> Jim Laskey has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 40 commits:
>>
>> - Merge branch 'master' into 8248862
>> - 8248862: Implement Enhanced Pseudo-Random Number Generators
>>
>> Update package-info.java
>> - 8248862: Implement Enhanced Pseudo-Random Number Generators
>>
>> Updated RandomGeneratorFactory javadoc.
>> - 8248862: Implement Enhanced Pseudo-Random Number Generators
>>
>> Updated documentation for RandomGeneratorFactory.
>> - Merge branch 'master' into 8248862
>> - Merge branch 'master' into 8248862
>> - 8248862: Implement Enhanced Pseudo-Random Number Generators
>>
>> Move RandomGeneratorProperty
>> - Merge branch 'master' into 8248862
>> - 8248862: Implement Enhanced Pseudo-Random Number Generators
>>
>> Clear up javadoc
>> - 8248862; Implement Enhanced Pseudo-Random Number Generators
>>
>> remove RandomGeneratorProperty from API
>> - ... and 30 more: https://git.openjdk.java.net/jdk/compare/f7517386...6fe94c68
>
> src/jdk.random/share/classes/module-info.java line 53:
>
>> 51: uses RandomSupport;
>> 52:
>> 53: exports jdk.random to
>
> Why is this needed?
Removing
> src/java.base/share/classes/java/util/random/package-info.java line 50:
>
>> 48: * given its name.
>> 49: *
>> 50: * <p> The principal supporting class is {@link RandomGenertatorFactor}. This
>
> s/RandomGenertatorFactor/RandomGenertatorFactory
fixing
> src/java.base/share/classes/java/util/random/package-info.java line 140:
>
>> 138: *
>> 139: * <p> For applications with no special requirements,
>> 140: * "L64X128MixRandom" has a good balance among speed, space,
>
> The documentation assumes that the `jdk.random` module is present in the JDK image. Perhaps we need to spit the specifics to `jdk.random`?
But jdk.random isn't really a public API.
> src/java.base/share/classes/jdk/internal/util/random/RandomSupport.java line 1211:
>
>> 1209: Udiff = -Udiff;
>> 1210: U2 = U1;
>> 1211: U1 -= Udiff;
>
> Updated `U1` never used (recommend running the code through a checker e.g. use IntelliJ)
I noticed that before. I think it's a symmetry thing - will check with Guy.
> src/java.base/share/classes/jdk/internal/util/random/RandomSupport.java line 1157:
>
>> 1155: /*
>> 1156: * The tables themselves, as well as a number of associated parameters, are
>> 1157: * defined in class java.util.DoubleZigguratTables, which is automatically
>
> `DoubleZigguratTables` is an inner class of `RandomSupport`
Late change fixing.
> src/java.base/share/classes/jdk/internal/util/random/RandomSupport.java line 2895:
>
>> 2893: * distribution: 0.0330
>> 2894: */
>> 2895: static class DoubleZigguratTables {
>
> make `final`
fixing
> src/java.base/share/classes/java/util/random/RandomGeneratorFactory.java line 167:
>
>> 165: * Return the properties map for the specified provider.
>> 166: *
>> 167: * @param provider provider to locate.
>
> Method has no such parameter
Fixing
-------------
PR: https://git.openjdk.java.net/jdk/pull/1273
More information about the build-dev
mailing list