On Thu, 16 Apr 2026 07:05:07 GMT, Daniel Jeliński <[email protected]> wrote:

>> SunJSSE implementation of `SSLEngine` throws an exception if being used 
>> before calling `setUseClientMode()`. Javadoc wording in `SSLContextSpi` and 
>> `SSLContext` classes should be improved.
>> 
>> ---------
>> - [x] I confirm that I make this contribution in accordance with the 
>> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai).
>
> src/java.base/share/classes/javax/net/ssl/SSLContext.java line 354:
> 
>> 352:      *
>> 353:      * @implNote
>> 354:      * It is provider-specific if the returned SSLEngine uses client or
> 
> I think I'd keep the "It is provider-specific" sentence, though I'm not sure 
> if it belongs in the implNote.

Agreed, but as written, it implies that there is always a default, which is not 
the case for the SunJSSE provider. So I think it would need to be reworded 
like: "It is provider-specific if the returned SSLEngine uses client or server 
mode by default for the (D)TLS connection, or requires the mode to be set."

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

PR Review Comment: https://git.openjdk.org/jdk/pull/30754#discussion_r3093226724

Reply via email to