ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/test/loops/IntMapCheck.java
(Generate patch)

Comparing jsr166/src/test/loops/IntMapCheck.java (file contents):
Revision 1.9 by jsr166, Wed Sep 1 07:47:27 2010 UTC vs.
Revision 1.13 by jsr166, Wed Dec 31 17:00:58 2014 UTC

# Line 1 | Line 1
1   /*
2   * Written by Doug Lea with assistance from members of JCP JSR-166
3   * Expert Group and released to the public domain, as explained at
4 < * http://creativecommons.org/licenses/publicdomain
4 > * http://creativecommons.org/publicdomain/zero/1.0/
5   */
6   /**
7   * @test
8   * @synopsis Times and checks basic map operations
9   */
10 import java.util.*;
10   import java.io.*;
11 + import java.util.*;
12  
13   public class IntMapCheck {
14      static int absentSize;
# Line 22 | Line 22 | public class IntMapCheck {
22      }
23  
24      public static void main(String[] args) throws Exception {
25 <        Class mapClass = java.util.concurrent.ConcurrentHashMap.class;
25 >        Class<?> mapClass = java.util.concurrent.ConcurrentHashMap.class;
26          int numTests = 50;
27          int size = 75000;
28  
# Line 73 | Line 73 | public class IntMapCheck {
73              stest(newMap(mapClass), size);
74      }
75  
76 <    static Map<Integer,Integer> newMap(Class cl) {
76 >    static Map<Integer,Integer> newMap(Class<?> cl) {
77          try {
78              Map m = (Map<Integer,Integer>)cl.newInstance();
79              return m;
# Line 607 | Line 607 | public class IntMapCheck {
607  
608      static void shuffle(Integer[] keys) {
609          int size = keys.length;
610 <        for (int i=size; i>1; i--) {
610 >        for (int i = size; i > 1; i--) {
611              int r = rng.nextInt(i);
612              Integer t = keys[i-1];
613              keys[i-1] = keys[r];

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines