RFR: 8317356: Test ClassFile API if it deals with nulls correctly across the whole API

Chen Liang liach at openjdk.org
Fri Oct 11 13:00:12 UTC 2024


On Fri, 11 Oct 2024 09:35:35 GMT, ExE Boss <duke at openjdk.org> wrote:

>> test/jdk/jdk/classfile/NullHostileTest.java line 1:
>> 
>>> 1: /*
>> 
>> I'm a bit worried about maintainability of such complex parametrized test with hard-listed method signatures in a text form. I would recommend to find better location/category and tier for the test.
>
> Perhaps the parameters could be annotated with a **JDK**‑internal `@Nullable` annotation, which would then be used by the test to determine whether the parameter is supposed to allow `null`s.
> 
> --------------------------------------------------------------------------------
> 
> This would also ease future migration to [Null‑Restricted and Nullable Types].
> 
> [Null‑Restricted and Nullable Types]: https://openjdk.org/jeps/8303099

Should I remove this test and only include the null checks in the pr?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/21458#discussion_r1796920856


More information about the core-libs-dev mailing list