RFR: 7038838: Unspecified NPE in java.net.IDN methods

Jaikiran Pai jpai at openjdk.org
Tue Dec 3 02:37:43 UTC 2024


On Fri, 29 Nov 2024 16:14:28 GMT, Jaikiran Pai <jpai at openjdk.org> wrote:

> Can I please get a review of this doc-only changes which specifies the methods on `java.net.IDN` to throw `NullPointerException` when any argument is null?
> 
> This addresses https://bugs.openjdk.org/browse/JDK-7038838. As noted in that issue, the current implementation of these methods already throw a NullPointerException for any null argument. This change now updates the specification to match the current implementation. 
> 
> A new jtreg test has been added to verify this behaviour. Note that there already was a `test/jdk/java/net/Socket/IDNTest.java` test but looking what that test does, the history of that test and the location of that test in `java/net/Socket` directory made me believe that it's not meant for testing the `java.net.IDN` class. That's why I created this new test class in `test/jdk/java/net/` directory.
> 
> I'll draft a CSR for this change.

Thank you Daniel and Chen for the reviews. The CSR has been approved and tier1, tier2 and tier3 testing has passed. I'll go ahead and integrate this now.

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

PR Comment: https://git.openjdk.org/jdk/pull/22463#issuecomment-2513414773


More information about the net-dev mailing list