This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-lang.git
commit 50587e0e00b24807ac866768200b6a15a4d75ef6 Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Tue Aug 20 07:32:14 2024 -0400 Better internal names --- src/main/java/org/apache/commons/lang3/RandomUtils.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/org/apache/commons/lang3/RandomUtils.java b/src/main/java/org/apache/commons/lang3/RandomUtils.java index 980485f1d..5344ae38c 100644 --- a/src/main/java/org/apache/commons/lang3/RandomUtils.java +++ b/src/main/java/org/apache/commons/lang3/RandomUtils.java @@ -58,11 +58,11 @@ public class RandomUtils { private static RandomUtils INSECURE = new RandomUtils(ThreadLocalRandom::current); - private static final Supplier<Random> SECURE_SUPPLIER = () -> RandomUtils.SECURE_RANDOM.get(); + private static final Supplier<Random> SECURE_STRONG_SUPPLIER = () -> RandomUtils.SECURE_RANDOM_STRONG.get(); - private static RandomUtils SECURE = new RandomUtils(SECURE_SUPPLIER); + private static RandomUtils SECURE_STRONG = new RandomUtils(SECURE_STRONG_SUPPLIER); - private static final ThreadLocal<SecureRandom> SECURE_RANDOM = ThreadLocal.withInitial(() -> { + private static final ThreadLocal<SecureRandom> SECURE_RANDOM_STRONG = ThreadLocal.withInitial(() -> { try { return SecureRandom.getInstanceStrong(); } catch (final NoSuchAlgorithmException e) { @@ -248,11 +248,11 @@ public class RandomUtils { * @since 3.16.0 */ public static RandomUtils secure() { - return SECURE; + return SECURE_STRONG; } static SecureRandom secureRandom() { - return SECURE_RANDOM.get(); + return SECURE_RANDOM_STRONG.get(); } private final Supplier<Random> random; @@ -268,7 +268,7 @@ public class RandomUtils { */ @Deprecated public RandomUtils() { - this(SECURE_SUPPLIER); + this(SECURE_STRONG_SUPPLIER); } private RandomUtils(final Supplier<Random> random) {