RFR: 8248862: Implement Enhanced Pseudo-Random Number Generators [v32]
Jim Laskey
jlaskey at openjdk.java.net
Mon Mar 22 14:42:49 UTC 2021
On Thu, 18 Mar 2021 21:43:16 GMT, Joe Darcy <darcy 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 67 commits:
>>
>> - Merge branch 'master' into 8248862
>> - Review revisions
>> - Missing @since
>> - Review revisions
>> - Review requested changes
>> - Merge branch 'master' into 8248862
>> - Remove conflicts
>> - Use isAnnotationPresent
>> - Introduce isDeprecated
>> - Update javadoc
>> - ... and 57 more: https://git.openjdk.java.net/jdk/compare/8c8d1b31...63094f9d
>
> src/java.base/share/classes/java/util/random/RandomGenerator.java line 1290:
>
>> 1288: * @return a new object that is a copy of this generator
>> 1289: */
>> 1290: LeapableGenerator copy();
>
> Suggest adding an Override annotation here and possibly to inheritDoc the text from Jumpable.copy.
Fails due to result variance.
> src/java.base/share/classes/java/util/random/RandomGenerator.java line 1455:
>
>> 1453: * period of this generator
>> 1454: */
>> 1455: void jump(double distance);
>
> Suggest Override and inheritDoc combo.
jump(double distance) does not occur in superinterface. The ability to jump arbitrarily is specific to ArbitrarilyJumpableGenerator.
> src/java.base/share/classes/java/util/random/RandomGenerator.java line 1465:
>
>> 1463: * @implSpec The default implementation invokes jump(jumpDistance()).
>> 1464: */
>> 1465: default void jump() { jump(jumpDistance()); }
>
> Should be able to avoid defining the jump method in this subinterface.
jump(double distance) does not occur in superinterface. The ability to jump arbitrarily is specific to ArbitrarilyJumpableGenerator.
> src/java.base/share/classes/java/util/random/RandomGenerator.java line 1486:
>
>> 1484: * ({@link Long#MAX_VALUE Long.MAX_VALUE}).
>> 1485: */
>> 1486: default Stream<ArbitrarilyJumpableGenerator> jumps(double distance) {
>
> Suggest adding an Override annotation.
jump(double distance) does not occur in superinterface. The ability to jump arbitrarily is specific to ArbitrarilyJumpableGenerator.
> src/java.base/share/classes/java/util/random/RandomGenerator.java line 1521:
>
>> 1519: * {@link ArbitrarilyJumpableGenerator#leapDistance() leapDistance}().
>> 1520: */
>> 1521: default void leap() { jump(leapDistance()); }
>
> Should need to define this method in the subinterface of Leapable.
jump(double distance) does not occur in superinterface. The ability to jump arbitrarily is specific to ArbitrarilyJumpableGenerator.
> src/java.base/share/classes/java/util/random/RandomGenerator.java line 1538:
>
>> 1536: * returns the copy.
>> 1537: */
>> 1538: default ArbitrarilyJumpableGenerator copyAndJump(double distance) {
>
> Suggest Override and inheritDoc.
jump(double distance) does not occur in superinterface. The ability to jump arbitrarily is specific to ArbitrarilyJumpableGenerator.
-------------
PR: https://git.openjdk.java.net/jdk/pull/1292
More information about the core-libs-dev
mailing list