On Tue, 21 Apr 2026 19:47:51 GMT, Volkan Yazici <[email protected]> wrote:
>> src/java.base/share/classes/javax/net/ssl/SNIHostName.java line 104:
>>
>>> 102: * Users are advised to prefer the {@link #ofString(String)
>>> ofString()}
>>> 103: * static factory method over this constructor, since the former
>>> performs
>>> 104: * stricter checks.
>>
>> I don't know if this will be seen, which makes me wonder if this should go a
>> step further and deprecate the constructors.
>
> I'm glad you said this, I completely agree with your concern and reasoning. I
> will do it.
>
> Though this reminded me another question I need some help with: Shall I
> migrate existing usages of `SNIHostName::new` to the new static factory
> methods in this PR? Slim PRs are ideal, but leaving the correction of
> call-sites to a 2nd PR bears the risk that we might end up having a 3rd PR if
> the 1st (this) one has any problems.
There may be compatibility issues with change the existing usages (as they
might fail with IAE) so I would keep that separate.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/30747#discussion_r3122066569