On Mon, 15 Dec 2025 15:50:53 GMT, Daniel Fuchs <[email protected]> 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
