RFR: 8336942: Improve test coverage for class loading elements with annotations of different retentions [v4]
Liam Miller-Cushon
cushon at openjdk.org
Thu Sep 26 01:22:26 UTC 2024
> 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.
Liam Miller-Cushon 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 five additional commits since the last revision:
- Merge remote-tracking branch 'origin/master' into JDK-8336942
- Merge branch 'master' into JDK-8336942
- Merge branch 'master' into JDK-8336942
- Sort entries in nameToAnnotation
- 8336942: Improve test coverage for class loading elements with annotations of different retentions
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/20287/files
- new: https://git.openjdk.org/jdk/pull/20287/files/d44ee835..25e4745f
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=20287&range=03
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=20287&range=02-03
Stats: 161519 lines in 897 files changed: 154024 ins; 3404 del; 4091 mod
Patch: https://git.openjdk.org/jdk/pull/20287.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/20287/head:pull/20287
PR: https://git.openjdk.org/jdk/pull/20287
More information about the compiler-dev
mailing list