On Fri, 17 Apr 2026 18:05:05 GMT, Weijun Wang <[email protected]> wrote:

>> Artur Barashev has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   Optimize the test. Remove testng dependency.
>
> src/java.base/share/classes/sun/security/x509/DNSName.java line 117:
> 
>> 115:             }
>> 116: 
>> 117:             if (label.startsWith("*")) {
> 
> Maybe we just check `label.equals("*")`? It can always be detected later at 
> the `DNS_ALLOWED.indexOf(c) < 0` check.

Yes, we can. One detail about it: the original code throws a separate exception 
for this case mentioning a wildcard, so we also throw an exception with a 
wildcard-specific message in the new code. Not sure how important it would be 
in practice though.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/30628#discussion_r3102409818

Reply via email to