On Thu, 30 Apr 2026 17:16:41 GMT, Weijun Wang <[email protected]> wrote:

>> Artur Barashev has updated the pull request with a new target base due to a 
>> merge or a rebase. The incremental webrev excludes the unrelated changes 
>> brought in by the merge/rebase. The pull request contains five additional 
>> commits since the last revision:
>> 
>>  - Add @throws section to getUseClientMode()
>>  - Merge branch 'master' into JDK-8382270
>>  - Throw an exception when getUseClientMode() is called before 
>> setUseClientMode(). Remove any notion of default from SSLEngine javadoc
>>  - Address review comments
>>  - 8382270: Update SSLContex API javadoc: require setUseClientMode call for 
>> SunJSSE
>
> src/java.base/share/classes/javax/net/ssl/SSLEngine.java line 1:
> 
>> 1: /*
> 
> The class spec at line 332 has
> 
> Note that the default mode for a new {@code SSLEngine} is provider-specific.
> 
> To me this sounds like there is always a default mode which is not correct. I 
> think this is a good place to add more description about the mode might be 
> "set" to a default value, or a provider may require the user to "set" it 
> explicitly. This will make it clear what "mode has not yet been set" means 
> exactly.

Good catch, we also have a section about it in the class-level javadoc. I'll 
update this text accordingly.

It also says `Applications should set the mode explicitly`, so I guess we 
change `This method must be called before any handshaking occurs` to `This 
method should be called before any handshaking occurs` below for consistency.

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

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

Reply via email to