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.9 by dl, Wed Jan 16 15:04:04 2013 UTC vs.
Revision 1.10 by dl, Tue Jan 22 17:17:52 2013 UTC

# Line 328 | Line 328 | public class ThreadLocalRandom extends R
328              r ^= r >>> 17;
329              r ^= r << 5;
330          }
331 <        else if ((r = (int)UNSAFE.getLong(t, SEED)) == 0)
332 <            r = 1; // avoid zero
331 >        else {
332 >            localInit();
333 >            if ((r = (int)UNSAFE.getLong(t, SEED)) == 0)
334 >                r = 1; // avoid zero
335 >        }
336          UNSAFE.putInt(t, SECONDARY, r);
337          return r;
338      }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines