RFR: 8361355: Negative cases of Annotated.getAnnotationData implementations are broken [v2]
Tom Rodriguez
never at openjdk.org
Thu Jul 3 14:59:39 UTC 2025
On Thu, 3 Jul 2025 14:13:23 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).
>
> Doug Simon has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR. The pull request contains one new commit since the last revision:
>
> fixed negative cases in getAnnotationData
Looks good.
-------------
Marked as reviewed by never (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/26116#pullrequestreview-2983525519
More information about the graal-dev
mailing list