RFR: 8343791: Socket.connect API should document whether the socket will be closed when hostname resolution fails or another error occurs [v22]

Volkan Yazıcı duke at openjdk.org
Fri Nov 29 15:35:45 UTC 2024


On Thu, 28 Nov 2024 14:37:33 GMT, Alan Bateman <alanb at openjdk.org> wrote:

>> Volkan Yazıcı has updated the pull request incrementally with two additional commits since the last revision:
>> 
>>  - Don't exceed 120 characters per line
>>  - Rework functional interfaces in tests
>
> I did a pass over the latest tests, it's improved a lot. One general comment is that I'm surprised to see 4 method sources, this test only needs one to yield two newly created Sockets. The benefit of doing that it that the setup will be in the tests so much easier to diagnose if we get a test failure. I'm sure Daniel will have comments but I think overall this is getting close to the finish line.

@AlanBateman, `UHE` message discrepancy between `Socket` (which we introduced in this PR) and `SocketImpl` was causing following tests to fail:


javax/xml/jaxp/unittest/common/dtd/DOMTest.java
javax/xml/jaxp/unittest/common/dtd/SAXTest.java
javax/xml/jaxp/unittest/common/catalog/SAXTest.java
javax/xml/jaxp/unittest/common/catalog/DOMTest.java


due to `test/jaxp/javax/xml/jaxp/unittest/common/util/TestBase.java:351` checking if the exception message is equal to the host name. I updated the `UHE` message in `Socket` to match the one in `SocketImpl`. I have triggered another `tier1..3` run as we speak.

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

PR Comment: https://git.openjdk.org/jdk/pull/22160#issuecomment-2508041143


More information about the net-dev mailing list