On Fri, 21 Nov 2025 13:07:26 GMT, Raffaello Giulietti <[email protected]>
wrote:
>> Justin Lu has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Use jdk.test.lib.RandomFactory
>
> test/jdk/java/text/Format/NumberFormat/NumberRoundTrip.java line 143:
>
>> 141: // Return a random value from -range..+range.
>> 142: private static double randomDouble(double range) {
>> 143: double a = Math.random();
>
> I would suggest using `jdk.test.lib.RandomFactory`, as this supports
> reproducible values in case of a randomised test failure.
>
>
> import jdk.test.lib.RandomFactory;
> ...
> * @library /test/lib
> * @build jdk.test.lib.RandomFactory
> ...
> private static final Random RANDOM = RandomFactory.getRandom();
> ...
> private static double randomDouble(double range) {
> double a = RANDOM.nextDouble();
> ...
Thanks for the improvement, updated in
https://github.com/openjdk/jdk/pull/28443/commits/dca988e7ddb51306c2f791eae5e9071c85796eb7.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28443#discussion_r2550523057