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

Comparing jsr166/src/jsr166y/ForkJoinPool.java (file contents):
Revision 1.17 by jsr166, Thu Jul 23 23:07:57 2009 UTC vs.
Revision 1.20 by jsr166, Fri Jul 24 22:05:22 2009 UTC

# Line 619 | Line 619 | public class ForkJoinPool extends Abstra
619              return true;
620          }
621          public void run() { invoke(); }
622 +        private static final long serialVersionUID = 5232453952276885070L;
623      }
624  
625      /**
# Line 647 | Line 648 | public class ForkJoinPool extends Abstra
648              }
649          }
650          public void run() { invoke(); }
651 +        private static final long serialVersionUID = 2838392045355241008L;
652      }
653  
654      public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks) {
655 <        ArrayList<ForkJoinTask<T>> ts =
655 >        ArrayList<ForkJoinTask<T>> forkJoinTasks =
656              new ArrayList<ForkJoinTask<T>>(tasks.size());
657 <        for (Callable<T> c : tasks)
658 <            ts.add(new AdaptedCallable<T>(c));
659 <        invoke(new InvokeAll<T>(ts));
660 <        return (List<Future<T>>) (List) ts;
657 >        for (Callable<T> task : tasks)
658 >            forkJoinTasks.add(new AdaptedCallable<T>(task));
659 >        invoke(new InvokeAll<T>(forkJoinTasks));
660 >
661 >        @SuppressWarnings({"unchecked", "rawtypes"})
662 >        List<Future<T>> futures = (List<Future<T>>) (List) forkJoinTasks;
663 >        return futures;
664      }
665  
666      static final class InvokeAll<T> extends RecursiveAction {
# Line 665 | Line 670 | public class ForkJoinPool extends Abstra
670              try { invokeAll(tasks); }
671              catch (Exception ignore) {}
672          }
673 +        private static final long serialVersionUID = -7914297376763021607L;
674      }
675  
676      // Configuration and status settings and queries
# Line 1831 | Line 1837 | public class ForkJoinPool extends Abstra
1837      // AbstractExecutorService overrides
1838  
1839      protected <T> RunnableFuture<T> newTaskFor(Runnable runnable, T value) {
1840 <        return new AdaptedRunnable(runnable, value);
1840 >        return new AdaptedRunnable<T>(runnable, value);
1841      }
1842  
1843      protected <T> RunnableFuture<T> newTaskFor(Callable<T> callable) {
1844 <        return new AdaptedCallable(callable);
1844 >        return new AdaptedCallable<T>(callable);
1845      }
1846  
1847  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines