On Tue, 3 May 2022 15:32:27 GMT, Martin Buchholz <mar...@openjdk.org> wrote:

>> Doug Lea has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   Address review comments
>
> src/java.base/share/classes/java/util/concurrent/CompletableFuture.java line 
> 2153:
> 
>> 2151: 
>> 2152:     @Override
>> 2153:     public Throwable exceptionNow() {
> 
> The unwrapping of CompletionExceptions should be documented

`exceptionNow` is specified to call `get`, which does not throw 
`CompletionException`:

     * @implSpec
     * The default implementation invokes {@code isDone()} to test if the task
     * has completed. If done and not cancelled, it invokes {@code get()} and
     * catches the {@code ExecutionException} to obtain the exception.

-------------

PR: https://git.openjdk.java.net/jdk/pull/8490

Reply via email to