RFR: 8371953: Document null handling in core reflection APIs [v6]

Alan Bateman alanb at openjdk.org
Wed Nov 19 15:57:02 UTC 2025


On Wed, 19 Nov 2025 15:39:31 GMT, Chen Liang <liach at openjdk.org> wrote:

>> A lot of core reflection APIs are from antique times, which have their own null handling behavior. Such behaviors are often not documented in the specification; we should document rejected null arguments and accepted null arguments (including array elements) explicitly.
>> 
>> In the investigation, I found `Class.isNestmateOf` (inconsistent) and `AnnotatedType`'s implementation of `AnnotatedElement` methods (required by specification) are missing null checks. I consider these unlikely to be a user dependency and added new null checks.
>
> Chen Liang has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Redundant extra sentences

Marked as reviewed by alanb (Reviewer).

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

PR Review: https://git.openjdk.org/jdk/pull/28336#pullrequestreview-3483520073


More information about the core-libs-dev mailing list