[jdk17u-dev] RFR: 8336942: Improve test coverage for class loading elements with annotations of different retentions [v2]

fitzsim duke at openjdk.org
Thu Nov 7 19:15:54 UTC 2024


On Tue, 5 Nov 2024 18:49:17 GMT, Liam Miller-Cushon <cushon at openjdk.org> wrote:

>> This change improves annotation processing test coverage, see [JDK-8336942](https://bugs.openjdk.org/browse/JDK-8336942). I resolved a trivial merge conflict with JDK-8323684, which added the `nameToAnnotation` map. The modified test passes.
>
> 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 two additional commits since the last revision:
> 
>  - Merge remote-tracking branch 'origin/master' into backport-JDK-8336942
>  - 8336942: Improve test coverage for class loading elements with annotations of different retentions
>    
>    Reviewed-by: vromero

_I am not a Reviewer; I maintain `java-17-openjdk` in `RHEL` so I try to review `rfr`-labelled pull requests for `jdk17u-dev`, time-permitting._

This looks like a good change to have in 17.  I tested it on `Fedora 41 x86_64`.

While trying this out, I noticed a potential oddity regarding `BasicAnnoTests.java`: the first of the two `Test` annotations does not seem to take effect.  For example, I would expect that changing:

`@Test(posn=0, annoType=TA.class, expect="1")`

to:

`@Test(posn=0, annoType=TA.class, expect="33")`

would cause a failure, but it does not.  Am I missing something?

I am testing with jtreg `857ed6167418cb4ebe2844fd536461a1649bdced` running on `jdk-17.0.13+11`.

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

PR Comment: https://git.openjdk.org/jdk17u-dev/pull/2955#issuecomment-2463022522


More information about the jdk-updates-dev mailing list