On Wed, 12 Oct 2022 13:26:29 GMT, Tagir F. Valeev <tval...@openjdk.org> wrote:
>> Java 17 added RandomGenerator interface. However, existing method >> Collections.shuffle accepts old java.util.Random class. While since Java 19, >> it's possible to use Random.from(RandomGenerator) wrapper, it would be more >> convenient to provide direct overload shuffle(List<?> list, RandomGenerator >> rnd). > > Tagir F. Valeev has updated the pull request incrementally with one > additional commit since the last revision: > > Fixes according to review > > 1. Reduce duplication in tests > 2. Use JumpableGenerator#copy() instead of create(1) in tests, as according > to the spec, seed can be ignored > 3. Simplify documentation for shuffle(List, Random) to avoid duplication. Sorry, this got derailed by the discussion of `SequencedCollection::replaceAll`. I think we should just set that issue aside. I don't think `SequencedCollection::replaceAll` makes sense, thus this PR shouldn't be held up on its account. The change is fine in concept. A couple adjustments needs to be made: javadoc since-tags need to be updated to 21, and copyrights updated to 2023. (Well, maybe an argument could be made that they should stay at 2022. I don't particularly care.) Also, the CSR should be updated to reflect the changes to the specifications. Other than those items, this should be fine to move forward. ------------- PR: https://git.openjdk.org/jdk/pull/10520