On Sat, 15 Nov 2025 23:04:53 GMT, Chen Liang <[email protected]> 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.

This pull request has now been integrated.

Changeset: 2358d40c
Author:    Chen Liang <[email protected]>
URL:       
https://git.openjdk.org/jdk/commit/2358d40cbcafb851425176cacf65cc3be1ae12a2
Stats:     456 lines in 16 files changed: 405 ins; 16 del; 35 mod

8371953: Document null handling in core reflection APIs

Reviewed-by: alanb

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

PR: https://git.openjdk.org/jdk/pull/28336

Reply via email to