On Tue, 21 Apr 2026 19:52:44 GMT, Volkan Yazici <[email protected]> wrote:

>> src/java.base/share/classes/javax/net/ssl/SNIHostName.java line 182:
>> 
>>> 180:      * RFC 6066: Transport Layer Security (TLS) Extensions: Extension 
>>> Definitions
>>> 181:      */
>>> 182:     public static SNIHostName ofString(String hostname) {
>> 
>> ofHostName(String) and ofEncoded(byte) is another choice that would make it 
>> clear at the use sites.
>
> I had considered how it would look like at the call-site:
> 
> 
> SNIHostName.ofHostName(hostName);  // Too verbose/noisy with repetition?
> 
> 
> and then thought of:
> 
> 
> SNIHostName.ofString(hostName);
> SNIHostName.ofBytes(hostName);
> 
> 
> But I will leave the decision on naming to those more experienced in this 
> field.

SNIHostName.of(String) and SNIHostName.ofEncoded(byte[]) are other candidates.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/30747#discussion_r3122103076

Reply via email to