On Thu, 8 Aug 2024 21:23:58 GMT, Brian Burkhalter <b...@openjdk.org> wrote:

>> Thanks for the suggestions. I will look into it.
>
> Without loading libnet in Inet6AddressImpl, the test 
> java/net/InetAddress/NullCharInHostnameDriver.java fails with 
> UnsatisfiedLinkError:
> 
> java.lang.UnsatisfiedLinkError: 'java.net.InetAddress[] 
> java.net.Inet6AddressImpl.lookupAllHostAddr(java.lang.String, int)'
>       at java.base/java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
>       at 
> java.base/java.net.Inet6AddressImpl.lookupAllHostAddr(Inet6AddressImpl.java:52)
>       at 
> java.base/java.net.NullCharInHostname.main(NullCharInHostname.java:37)
> 
> This is on Unix (Linux, macOS) only, not on Windows.

OK, this test uses a private API to create an instance of Inet6AddressImpl; 
This explain why in this test Inet6AddressImpl gets loaded before InetAddress.

            var impl = new Inet6AddressImpl();

It should never happen outside of this test. Now the tricky question: what in 
your proposed changes caused "net" not to be loaded before the test created new 
Inet6AddressImpl(); ?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20317#discussion_r1711100272

Reply via email to