ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/main/java/util/concurrent/ThreadLocalRandom.java
(Generate patch)

Comparing jsr166/src/main/java/util/concurrent/ThreadLocalRandom.java (file contents):
Revision 1.48 by jsr166, Sun Nov 13 02:23:22 2016 UTC vs.
Revision 1.49 by jsr166, Sun Nov 13 03:36:50 2016 UTC

# Line 170 | Line 170 | public class ThreadLocalRandom extends R
170  
171      /**
172       * Generates a pseudorandom number with the indicated number of
173 <     * bits. Unlike in superclass {@link Random}, this method is never
174 <     * internally called or used by any other publicly accessible
175 <     * method.
173 >     * low-order bits.  Because this class has no subclasses, this
174 >     * method cannot be invoked or overriden.
175       *
176       * @param  bits random bits
177       * @return the next pseudorandom value from this random number
178       *         generator's sequence
179       */
180      protected int next(int bits) {
181 <        return (int)(mix64(nextSeed()) >>> (64 - bits));
181 >        return nextInt() >>> (32 - bits);
182      }
183  
184      /**

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines