RFR: 8254023: A module declaration is not allowed to be a target of an annotation that lacks an @Target meta-annotation
Vicente Romero
vromero at openjdk.java.net
Thu Dec 10 19:36:56 UTC 2020
On Thu, 10 Dec 2020 13:44:59 GMT, Joel Borggrén-Franck <jfranck at openjdk.org> wrote:
> Hi,
>
> I don't think TargetAnnoCombo should be updated, at least not for this fix. It is an old hard to understand test that predates modules.
>
> It would be good to do further testing as Vicente writes. I suggest:
>
> 1. A test that the module info compiles, you already have this.
>
> 2. A test that the class file contains the bytes for the annotation might make sense. As Jon has pointed out in different review threads there is the toolbox, perhaps that could be of use? There are some examples of toolbox tests in `jdk/test/langtools/tools/javac/modules` though I don't have a good example of one that verifies the contents of the class file. Perhaps @vicente-romero-oracle can point to an example?
it is probably an overkill but method: `testAnnos` in test: `test/langtools/tools/javac/records/RecordCompilationTests.java` is an example applied to records that could be adapted to what we want here
-------------
PR: https://git.openjdk.java.net/jdk/pull/622
More information about the compiler-dev
mailing list