question: public void testWhenComplete_exceptionalCompletion ( ) { for ( ExecutionMode m : ExecutionMode . values ( ) ) for ( boolean createIncomplete : new boolean [ ] { true , false } ) { final AtomicInteger a = new AtomicInteger ( 0 ) ; final CFException ex = new CFException ( ) ; final CompletableFuture < Integer > f = new CompletableFuture < > ( ) ; if ( ! createIncomplete ) f . completeExceptionally ( ex ) ; final CompletableFuture < Integer > g = m . whenComplete ( f , null ) ; if ( createIncomplete ) f . completeExceptionally ( ex ) ; checkCompletedWithWrappedException ( g , ex ) ; checkCompletedExceptionally ( f , ex ) ; assertEquals ( 1 , a . get ( ) ) ; } }
target:  whenComplete action executes on exceptional completion, propagating source result.