RFR: 8294693: Add Collections.shuffle overload that accepts RandomGenerator interface [v6]
Sergey Bylokhov
serb at openjdk.org
Sat Jan 21 19:41:12 UTC 2023
On Sat, 21 Jan 2023 18:31:28 GMT, Tagir F. Valeev <tvaleev at 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 two additional commits since the last revision:
>
> - Whitespaces fixed
> - @implSpec added to shuffle(List)
Filed, will create a PR soon.
https://bugs.openjdk.org/browse/JDK-8300817
-------------
PR: https://git.openjdk.org/jdk/pull/10520
More information about the core-libs-dev
mailing list