--- jsr166/src/test/loops/PriorityQueueSort.java 2005/05/09 19:33:30 1.2 +++ jsr166/src/test/loops/PriorityQueueSort.java 2009/11/02 23:51:32 1.5 @@ -12,10 +12,10 @@ import java.util.*; public class PriorityQueueSort { - static class MyComparator implements Comparator { + static class MyComparator implements Comparator { public int compare(Integer x, Integer y) { - int i = ((Integer)x).intValue(); - int j = ((Integer)y).intValue(); + int i = x; + int j = y; if (i < j) return -1; if (i > j) return 1; return 0; @@ -23,10 +23,10 @@ public class PriorityQueueSort { } public static void main(String[] args) { - int n = 10000; + int n = 100000; if (args.length > 0) n = Integer.parseInt(args[0]); - + List sorted = new ArrayList(n); for (int i = 0; i < n; i++) sorted.add(new Integer(i)); @@ -67,4 +67,3 @@ public class PriorityQueueSort { throw new RuntimeException("Iterator remove test failed."); } } -