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.15 by jsr166, Wed Feb 27 16:55:04 2013 UTC vs.
Revision 1.16 by jsr166, Thu Jul 18 17:48:28 2013 UTC

# Line 354 | Line 354 | public class ThreadLocalRandom extends R
354  
355      /**
356       * Saves the {@code ThreadLocalRandom} to a stream (that is, serializes it).
357 +     * @param s the stream
358       */
359 <    private void writeObject(java.io.ObjectOutputStream out)
359 >    private void writeObject(java.io.ObjectOutputStream s)
360          throws java.io.IOException {
361  
362 <        java.io.ObjectOutputStream.PutField fields = out.putFields();
362 >        java.io.ObjectOutputStream.PutField fields = s.putFields();
363          fields.put("rnd", UNSAFE.getLong(Thread.currentThread(), SEED));
364          fields.put("initialized", true);
365 <        out.writeFields();
365 >        s.writeFields();
366      }
367  
368      /**
369       * Returns the {@link #current() current} thread's {@code ThreadLocalRandom}.
370 +     * @return the {@link #current() current} thread's {@code ThreadLocalRandom}
371       */
372      private Object readResolve() {
373          return current();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines