RFR: 8361355: Negative cases of Annotated.getAnnotationData implementations are broken [v3]

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


On Thu, 3 Jul 2025 17:30:56 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 updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains two additional commits since the last revision:
> 
>  - Merge tag 'jdk-26+4' into JDK-8361355
>    
>    Added tag jdk-26+4 for changeset 1ca008fd
>  - fixed negative cases in getAnnotationData

Thanks for the review.

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

PR Comment: https://git.openjdk.org/jdk/pull/26116#issuecomment-3034837278


More information about the graal-dev mailing list