RFR: 8373676: Test javax/net/ssl/HttpsURLConnection/SubjectAltNameIP.java fails on a machine without IPV6

Daniel Fuchs dfuchs at openjdk.org
Mon Dec 15 16:22:00 UTC 2025


On Mon, 15 Dec 2025 15:50:53 GMT, Daniel Fuchs <dfuchs at openjdk.org> wrote:

>> Looking more at the checks,  I think we can always use the exception 
>> `JNU_ThrowByName(env, JNU_JAVANETPKG "SocketException", "Protocol family ipv6, ipv6 on machine unavailable");`
>> without the if and else. At least as long as the other if checks do not change. Do you agree?
>
> That's what I would expect. I have not double checked.

I believe you are right - we enter the if part if:

ipv6 is available AND ( family != IPv4 OR  mapped == true)
=> we either have an IPv6 address or we have an IPv4 address that will be mapped to an IPv6 address

So if we enter the else, either we have an IPv4 address, or we don't. If we don't, then we are here because IPv6 is not available.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/28825#discussion_r2620038083


More information about the net-dev mailing list