RFR: 8332497: javac crashes when annotation processing runs on program with module imports [v7]
Joe Darcy
darcy at openjdk.org
Tue May 21 16:12:03 UTC 2024
On Tue, 21 May 2024 09:58:38 GMT, Evemose <duke at openjdk.org> wrote:
>> Fix is pretty simple: visitModuleImport in com.sun.tools.javac.tree.TreeScanner has notbeen overriden, so defaulted to Visitor::visitModuleImport, which forwards to Visitor::visitTree, which is also not overriden, and, therefore, threw AssertionError.
>>
>> PS: Im not even sure how it worked before without crashing, seems like there is some intermidiate implementation between this TreeScanner and actual scanners because otherwise it should have resultedin compile error the moment it encounter module importin any visitor
>
> Evemose has updated the pull request incrementally with one additional commit since the last revision:
>
> Added legal header and renamed test
test/langtools/tools/javac/annotations/ModuleImportProcessingTest.java line 1:
> 1: /*
Looks like this test would work better as a "native" annotation processing test.
I recommend look in the `test/langtools/tools/javac/processing` directory hierarchy, specifically for test classes that subclass `JavacTestingAbstractProcessor`. HTH
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/19292#discussion_r1608598976
More information about the compiler-dev
mailing list