On Sun, 28 Apr 2024 09:54:34 GMT, Viktor Klang <vkl...@openjdk.org> wrote:

> Primarily offering this PR for discussion, as Throwables throwing exceptions 
> on toString(), getLocalizedMessage(), or getMessage() seems like a rather 
> unreasonable thing to do.
> 
> Nevertheless, there is some things we can do, as witnessed in this PR.

src/java.base/share/classes/java/util/concurrent/CompletableFuture.java line 
310:

> 308: 
> 309:     static CompletionException wrapInCompletionException(Throwable t) {
> 310:         if (t == null)

Is there any preexisting code path that ever passes a null? If not I don't 
think this check is necessary.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18988#discussion_r1582947192

Reply via email to