RNG-175: Fix MSWS createSeed(UniformRandomProvider) to handle a bad RNG
authoraherbert <aherbert@apache.org>
Tue, 5 Apr 2022 12:26:04 +0000 (13:26 +0100)
committeraherbert <aherbert@apache.org>
Tue, 5 Apr 2022 12:26:04 +0000 (13:26 +0100)
commitd01b5051799cd60f7b675e4ee1680bc35079b436
tree73656376f568304b1aff2687dbcba856ae965e9b
parentd340b9680b9cf5eac089166c82a753ef2ca1bd3c
RNG-175: Fix MSWS createSeed(UniformRandomProvider) to handle a bad RNG

The createSeed(UniformRandomProvider) method should generate a seed even
if the input RNG is non-functional. This fixes an infinite loop when the
RNG output is not suitably random to create a seed.
commons-rng-simple/src/main/java/org/apache/commons/rng/simple/internal/ProviderBuilder.java
commons-rng-simple/src/test/java/org/apache/commons/rng/simple/RandomSourceTest.java
src/changes/changes.xml