On Wed, 8 Oct 2025 16:08:14 GMT, Francesco Andreuzzi <[email protected]> 
wrote:

>> @fandreuz why would you want to do that? x == null means the expected cause 
>> has not been found. In which case we want to throw the AssertionError, with 
>> the root exception as the cause, possibly stripping the outer 
>> CompletionException if any as that is of little interest.
>
> What I mean is that the assertion may not be needed.

oh - sorry for misunderstanding. yes that's the purpose of the assertion to 
assert the (sometime not so) obvious.
It's there for expressing intent and providing extra safety against future 
modifications.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27694#discussion_r2414409422

Reply via email to