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.19 by jsr166, Sun Jul 14 19:55:05 2013 UTC vs.
Revision 1.22 by jsr166, Sun Jan 18 20:17:33 2015 UTC

# Line 5 | Line 5
5   */
6  
7   package jsr166e;
8 +
9   import java.util.concurrent.Future;
10   import java.util.concurrent.FutureTask;
11   import java.util.concurrent.TimeUnit;
# Line 1390 | Line 1391 | public class CompletableFuture<T> implem
1391       *
1392       * @param supplier a function returning the value to be used
1393       * to complete the returned CompletableFuture
1394 +     * @param <U> the function's return type
1395       * @return the new CompletableFuture
1396       */
1397      public static <U> CompletableFuture<U> supplyAsync(Generator<U> supplier) {
# Line 1408 | Line 1410 | public class CompletableFuture<T> implem
1410       * @param supplier a function returning the value to be used
1411       * to complete the returned CompletableFuture
1412       * @param executor the executor to use for asynchronous execution
1413 +     * @param <U> the function's return type
1414       * @return the new CompletableFuture
1415       */
1416      public static <U> CompletableFuture<U> supplyAsync(Generator<U> supplier,
# Line 1460 | Line 1463 | public class CompletableFuture<T> implem
1463       * the given value.
1464       *
1465       * @param value the value
1466 +     * @param <U> the type of the value
1467       * @return the completed CompletableFuture
1468       */
1469      public static <U> CompletableFuture<U> completedFuture(U value) {
# Line 2827 | Line 2831 | public class CompletableFuture<T> implem
2831              }
2832              if (dst == null)
2833                  dst = new CompletableFuture<U>();
2834 <            if (e == null || ex != null)
2834 >            if (ex != null)
2835                  dst.internalComplete(null, ex);
2836          }
2837          helpPostComplete();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines