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

Comparing jsr166/src/test/tck/CompletableFutureTest.java (file contents):
Revision 1.180 by jsr166, Sun Nov 6 22:42:10 2016 UTC vs.
Revision 1.182 by jsr166, Tue Jan 3 03:18:02 2017 UTC

# Line 93 | Line 93 | public class CompletableFutureTest exten
93       * Returns the "raw" internal exceptional completion of f,
94       * without any additional wrapping with CompletionException.
95       */
96 <    <U> Throwable exceptionalCompletion(CompletableFuture<U> f) {
97 <        // handle (and whenComplete) can distinguish between "direct"
98 <        // and "wrapped" exceptional completion
99 <        return f.handle((U u, Throwable t) -> t).join();
96 >    Throwable exceptionalCompletion(CompletableFuture<?> f) {
97 >        // handle (and whenComplete and exceptionally) can distinguish
98 >        // between "direct" and "wrapped" exceptional completion
99 >        return f.handle((u, t) -> t).join();
100      }
101  
102      void checkCompletedExceptionally(CompletableFuture<?> f,
# Line 3693 | Line 3693 | public class CompletableFutureTest exten
3693      public void testCompleteAsync2() {
3694          CompletableFuture<Integer> f = new CompletableFuture<>();
3695          CFException ex = new CFException();
3696 <        f.completeAsync(() -> {if (true) throw ex; return 1;});
3696 >        f.completeAsync(() -> { throw ex; });
3697          try {
3698              f.join();
3699              shouldThrow();
# Line 3723 | Line 3723 | public class CompletableFutureTest exten
3723          CompletableFuture<Integer> f = new CompletableFuture<>();
3724          CFException ex = new CFException();
3725          ThreadExecutor executor = new ThreadExecutor();
3726 <        f.completeAsync(() -> {if (true) throw ex; return 1;}, executor);
3726 >        f.completeAsync(() -> { throw ex; }, executor);
3727          try {
3728              f.join();
3729              shouldThrow();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines