From f49e205f68fe5c9e307f08157c9544b81b3b0c18 Mon Sep 17 00:00:00 2001 From: "ray.j.greenwell" Date: Fri, 1 Oct 2010 23:08:03 +0000 Subject: [PATCH] Make this inner class protected, as we're fans of that access level. Use at your own risk! git-svn-id: https://samskivert.googlecode.com/svn/trunk@2909 6335cc39-0255-0410-8fd6-9bcaacd3b74c --- src/main/java/com/samskivert/util/Randoms.java | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/main/java/com/samskivert/util/Randoms.java b/src/main/java/com/samskivert/util/Randoms.java index 69ddd385..1f14ea99 100644 --- a/src/main/java/com/samskivert/util/Randoms.java +++ b/src/main/java/com/samskivert/util/Randoms.java @@ -308,19 +308,13 @@ public class Randoms * tasks (for example, each a {@link ForkJoinTask}) use random numbers * in parallel in thread pools. * - *

Usages of this class should typically be of the form: - * {@code ThreadLocalRandom.current().nextX(...)} (where - * {@code X} is {@code Int}, {@code Long}, etc). - * When all usages are of this form, it is never possible to - * accidently share a {@code ThreadLocalRandom} across multiple threads. - * *

This class also provides additional commonly used bounded random * generation methods. * * @since 1.7 * @author Doug Lea */ - static class ThreadLocalRandom extends Random { + protected static class ThreadLocalRandom extends Random { // same constants as Random, but must be redeclared because private private final static long multiplier = 0x5DEECE66DL; private final static long addend = 0xBL;