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

Comparing jsr166/src/main/java/util/Collections.java (file contents):
Revision 1.8 by dl, Wed May 25 14:05:06 2005 UTC vs.
Revision 1.9 by jsr166, Fri May 27 03:44:18 2005 UTC

# Line 408 | Line 408 | public class Collections {
408       *         its list-iterator does not support the <tt>set</tt> operation.
409       */
410      public static void shuffle(List<?> list) {
411 +        if (r == null) {
412 +            r = new Random();
413 +        }
414          shuffle(list, r);
415      }
416 <    private static Random r = new Random();
416 >    private static Random r;
417  
418      /**
419       * Randomly permute the specified list using the specified source of

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines