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

Comparing jsr166/src/jsr166y/ForkJoinTask.java (file contents):
Revision 1.18 by dl, Sat Jul 25 15:50:57 2009 UTC vs.
Revision 1.19 by dl, Sat Jul 25 17:49:01 2009 UTC

# Line 606 | Line 606 | public abstract class ForkJoinTask<V> im
606       * in exceptions or errors, possibly including ClassCastException.
607       *
608       * @param tasks the collection of tasks
609 +     * @return the tasks argument, to simplify usage
610       * @throws NullPointerException if tasks or any element are null
611       * @throws RuntimeException or Error if any task did so
612       */
613 <    public static void invokeAll(Collection<? extends ForkJoinTask<?>> tasks) {
613 >    public static <T extends ForkJoinTask<?>> Collection<T> invokeAll(Collection<T> tasks) {
614          if (!(tasks instanceof List<?>)) {
615              invokeAll(tasks.toArray(new ForkJoinTask<?>[tasks.size()]));
616 <            return;
616 >            return tasks;
617          }
618          @SuppressWarnings("unchecked")
619          List<? extends ForkJoinTask<?>> ts =
# Line 647 | Line 648 | public abstract class ForkJoinTask<V> im
648          }
649          if (ex != null)
650              rethrowException(ex);
651 +        return tasks;
652      }
653  
654      /**

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines