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

Comparing jsr166/src/main/java/util/concurrent/CompletableFuture.java (file contents):
Revision 1.222 by dl, Fri Oct 16 11:48:41 2020 UTC vs.
Revision 1.223 by dl, Sun Jan 10 14:09:44 2021 UTC

# Line 14 | Line 14 | import java.util.function.BiFunction;
14   import java.util.function.Consumer;
15   import java.util.function.Function;
16   import java.util.function.Supplier;
17 + import java.util.Objects;
18  
19   /**
20   * A {@link Future} that may be explicitly completed (setting its
# Line 409 | Line 410 | public class CompletableFuture<T> implem
410  
411      /** Fallback if ForkJoinPool.commonPool() cannot support parallelism */
412      static final class ThreadPerTaskExecutor implements Executor {
413 <        public void execute(Runnable r) { new Thread(r).start(); }
413 >        public void execute(Runnable r) {
414 >            Objects.requireNonNull(r);
415 >            new Thread(r).start();
416 >        }
417      }
418  
419      /**

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines