Integrated: 8361355: Negative cases of Annotated.getAnnotationData implementations are broken

Doug Simon dnsimon at openjdk.org
Fri Jul 4 07:39:46 UTC 2025


On Thu, 3 Jul 2025 12:52:10 GMT, Doug Simon <dnsimon at openjdk.org> wrote:

> This PR fixes bugs in the implementation of `jdk.vm.ci.meta.Annotated.getAnnotationData`:
> 1. Calling `getAnnotatedData(annotationType)` fails with an ArrayIndexOutOfBoundsException instead of returning null when the receiver type is not annotated by `annotationType`.
> 2. Calling either of the `getAnnotatedData` methods with an `annotationType` value that does not represent an annotation interface silently succeeds when the receiver type does not (or can not) have any annotations (e.g. array and primitive types).

This pull request has now been integrated.

Changeset: 5cf349c3
Author:    Doug Simon <dnsimon at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/5cf349c3b08324e994a4143dcc34a59fd81323f9
Stats:     111 lines in 7 files changed: 94 ins; 1 del; 16 mod

8361355: Negative cases of Annotated.getAnnotationData implementations are broken

Reviewed-by: never

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

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


More information about the graal-dev mailing list