On Mon, 25 Nov 2024 09:36:55 GMT, Alan Bateman <al...@openjdk.org> wrote:

>> @AlanBateman, this assertion causes `IDNTest` to fail:
>> 
>> 
>> java.lang.AssertionError
>>      at java.base/java.net.Socket.<init>(Socket.java:457)
>>      at java.base/java.net.Socket.<init>(Socket.java:276)
>>      at IDNTest.main(IDNTest.java:37)
>> 
>> 
>> How shall I proceed?
>
> Mark Sheppard spotted that too, see exchange in JBS issue. You can drop the 
> !isUnresolved from the assert or eagerly throw UHE if attempting to creating 
> a Socket with an unresolved address, either is fine but probably simple to 
> adjust the assert. The downside is that if someone creates a Socket with an 
> unresolved address then it will create a SocketImpl and attempt to connect 
> before it detects the bad input. It's a corner case so not a big deal.

Yes, I was indeed pinged by @msheppar. (Sorry, I missed the JBS conversation.) 
Removed the `&& !isa.isUnresolved()` from the assertion in 
6b13675de44fd24766d355929f9b695a48cacc71.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/22160#discussion_r1856297576

Reply via email to