On Fri, 10 Apr 2026 20:38:33 GMT, Marcono1234 <[email protected]> wrote:
>> Hi, may I get a review for this change that converts the remaining TestNG >> tests under test/jdk/java/net to JUnit. >> >> An exception is `java/net/NetworkInterface/NetworkInterfaceStreamTest.java` >> which depends on library classes depending on TestNG. Converting that test >> is not done here but is tracked by >> [JDK-8381848](https://bugs.openjdk.org/browse/JDK-8381848) >> >> --------- >> - [x] I confirm that I make this contribution in accordance with the >> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai). > > test/jdk/java/net/InetSocketAddress/ToString.java line 88: > >> 86: >> 87: @Test >> 88: // InetSocketAddress.toString() throws NPE with unresolved address > > This comment is wrong / misleading; it was the behavior before > https://bugs.openjdk.org/browse/JDK-4464064 was fixed > > Maybe would also be good to rename the method then from `NPETest` to > `unresolvedTest` or similar? I will clarify move the comment inside the method where it belongs and use `assertDoesNotThrow`: @Test public void NPETest() { // Test that InetSocketAddress.toString() does not throw NPE with unresolved address assertDoesNotThrow(() -> System.out.println( new InetSocketAddress("unresolved", 12345))); } ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/30681#discussion_r3073149531
