Integrated: 8336942: Improve test coverage for class loading elements with annotations of different retentions

Liam Miller-Cushon cushon at openjdk.org
Thu Sep 26 15:13:42 UTC 2024


On Mon, 22 Jul 2024 23:05:13 GMT, Liam Miller-Cushon <cushon at openjdk.org> wrote:

> This changes adds some additional test coverage for the handling of type use annotations read from class files added in [JDK-8225377](https://bugs.openjdk.org/browse/JDK-8225377).
> 
> If both a `RUNTIME` and `CLASS` retention type annotation appear on the same element loaded from a class file, the annotations are attached by separate `TypeAnnotationCompleter's`s, and the logic in `ClassReader` needs to merge the annotations from the second attribute with annotations added by the first one.
> 
> The implementation already handles this correctly, but there isn't explicit test coverage for it. This change adds test coverage for that case.

This pull request has now been integrated.

Changeset: e36ce5f0
Author:    Liam Miller-Cushon <cushon at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/e36ce5f0341e8d0ec06cb12d0b2c0aa084401021
Stats:     15 lines in 1 file changed: 14 ins; 0 del; 1 mod

8336942: Improve test coverage for class loading elements with annotations of different retentions

Reviewed-by: vromero

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

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


More information about the compiler-dev mailing list