RFR: 8254023: A module declaration is not allowed to be a target of an annotation that lacks an @Target meta-annotation
vromero at openjdk.java.net
Wed Dec 9 06:38:33 UTC 2020
On Mon, 7 Dec 2020 15:51:59 GMT, Vicente Romero <vromero at openjdk.org> wrote:
>>> Short term (Java 16) it makes sense to fix https://bugs.openjdk.java.net/browse/JDK-8254023 given that both competing specs agree for this case, it is a small fix, and externally found.
>>>For Java 17 we should align both specs and the reference implementation one way or another.
>> @jbf According to your comments, I revise my code to only fix JDK-8254023.
>> The rest of the work, ambiguity of the specifications, will be clarified and fixed in Java 17.
>> Thank you for taking the time to review.
> the change looks good but I'm surprised that no other tests are failing and need changes, in particular tests like: `test/langtools/tools/javac/annotations/repeatingAnnotations/combo/TargetAnnoCombo.java`
> @vicente-romero-oracle It is difficult to identify which test should be changed, because all the tests passed. As you said, the `TargetAnnoCombo.java` maybe need to be changed. I want to revise it now. Should I do it?
sure please, I think that you should not only check that that test passes but also modify it, explicitly adding cases for the MODULE target. As a general comment this change is simple but the implications are not. I think the patch needs to add more tests. We also need to test that annotation processors can `see` the annotation applied to modules, etc.
More information about the compiler-dev