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

Comparing jsr166/src/jsr166e/CompletableFuture.java (file contents):
Revision 1.18 by dl, Wed Jun 19 14:55:40 2013 UTC vs.
Revision 1.21 by dl, Tue Nov 26 18:36:21 2013 UTC

# Line 9 | Line 9 | import java.util.concurrent.Future;
9   import java.util.concurrent.FutureTask;
10   import java.util.concurrent.TimeUnit;
11   import java.util.concurrent.Executor;
12 import java.util.concurrent.ThreadLocalRandom;
12   import java.util.concurrent.ExecutionException;
13   import java.util.concurrent.TimeoutException;
14   import java.util.concurrent.CancellationException;
# Line 1391 | Line 1390 | public class CompletableFuture<T> implem
1390       *
1391       * @param supplier a function returning the value to be used
1392       * to complete the returned CompletableFuture
1393 +     * @param <U> the function's return type
1394       * @return the new CompletableFuture
1395       */
1396      public static <U> CompletableFuture<U> supplyAsync(Generator<U> supplier) {
# Line 1409 | Line 1409 | public class CompletableFuture<T> implem
1409       * @param supplier a function returning the value to be used
1410       * to complete the returned CompletableFuture
1411       * @param executor the executor to use for asynchronous execution
1412 +     * @param <U> the function's return type
1413       * @return the new CompletableFuture
1414       */
1415      public static <U> CompletableFuture<U> supplyAsync(Generator<U> supplier,
# Line 1461 | Line 1462 | public class CompletableFuture<T> implem
1462       * the given value.
1463       *
1464       * @param value the value
1465 +     * @param <U> the type of the value
1466       * @return the completed CompletableFuture
1467       */
1468      public static <U> CompletableFuture<U> completedFuture(U value) {
# Line 2828 | Line 2830 | public class CompletableFuture<T> implem
2830              }
2831              if (dst == null)
2832                  dst = new CompletableFuture<U>();
2833 <            if (e == null || ex != null)
2833 >            if (ex != null)
2834                  dst.internalComplete(null, ex);
2835          }
2836          helpPostComplete();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines