On Wed, 3 Dec 2025 19:53:22 GMT, Volkan Yazici <[email protected]> wrote:
>> The method `doClientSide()` is called from constructor, the
>> `clientSSLSocket` is non-static and was set to `null`. Therefore, it's the
>> only assignment of clientSSLSocket per instance. Or do you mean the check
>> must be in the the lambda-expr?
>
> I mean something like:
>
> Suggestion:
>
> sslSocket -> {
> assertNull(clientSSLSocket);
> clientSSLSocket = sslSocket;
> }));
>
>
> To avoid double-assignment and eventually causing verification of the wrong
> value.
I made `assertEquals` instead, otherwise it shows an incorrect message - it
prints the left hand operand as "expected" value, which in the case of
`assertNull` is in the right hand operand.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28577#discussion_r2589205237