This is an automated email from the ASF dual-hosted git repository. ebourg pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-text.git
commit d229ea9b48c3651e66752a5c3cba608fb042cc6c Author: Emmanuel Bourg <ebo...@apache.org> AuthorDate: Sat Oct 26 10:56:11 2024 +0200 Replaced the deprecated RandomSource.create() method with RandomSource.<SOURCE>.create() --- .../java/org/apache/commons/text/jmh/DoubleFormatPerformance.java | 3 +-- src/test/java/org/apache/commons/text/numbers/ParsedDecimalTest.java | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/test/java/org/apache/commons/text/jmh/DoubleFormatPerformance.java b/src/test/java/org/apache/commons/text/jmh/DoubleFormatPerformance.java index 738ae4c6..773262be 100644 --- a/src/test/java/org/apache/commons/text/jmh/DoubleFormatPerformance.java +++ b/src/test/java/org/apache/commons/text/jmh/DoubleFormatPerformance.java @@ -77,8 +77,7 @@ public class DoubleFormatPerformance { /** Sets up the instance for the benchmark. */ @Setup(Level.Iteration) public void setup() { - input = randomDoubleArray(size, minExp, maxExp, - RandomSource.create(RandomSource.XO_RO_SHI_RO_128_PP)); + input = randomDoubleArray(size, minExp, maxExp, RandomSource.XO_RO_SHI_RO_128_PP.create()); } } diff --git a/src/test/java/org/apache/commons/text/numbers/ParsedDecimalTest.java b/src/test/java/org/apache/commons/text/numbers/ParsedDecimalTest.java index 00b93bf8..78b6d667 100644 --- a/src/test/java/org/apache/commons/text/numbers/ParsedDecimalTest.java +++ b/src/test/java/org/apache/commons/text/numbers/ParsedDecimalTest.java @@ -373,7 +373,7 @@ public class ParsedDecimalTest { @Test void testMaxPrecision_random() { // arrange - final UniformRandomProvider rand = RandomSource.create(RandomSource.XO_RO_SHI_RO_128_PP, 0L); + final UniformRandomProvider rand = RandomSource.XO_RO_SHI_RO_128_PP.create(0L); final ParsedDecimal.FormatOptions opts = new FormatOptionsImpl(); for (int i = 0; i < 10_000; ++i) { @@ -480,7 +480,7 @@ public class ParsedDecimalTest { @Test void testStringMethodAccuracy_random() { // arrange - final UniformRandomProvider rand = RandomSource.create(RandomSource.XO_RO_SHI_RO_128_PP, 0L); + final UniformRandomProvider rand = RandomSource.XO_RO_SHI_RO_128_PP.create(0L); final FormatOptionsImpl stdOpts = new FormatOptionsImpl(); final FormatOptionsImpl altOpts = new FormatOptionsImpl();