RFR: 8332497: javac crashes when annotation processing runs on program with module imports [v8]

Evemose duke at openjdk.org
Wed May 22 11:05:21 UTC 2024


> 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:

  Converted test to extend JavacTestingAbstractProcessor

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/19292/files
  - new: https://git.openjdk.org/jdk/pull/19292/files/a38583af..a129ec0b

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=19292&range=07
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=19292&range=06-07

  Stats: 152 lines in 2 files changed: 45 ins; 107 del; 0 mod
  Patch: https://git.openjdk.org/jdk/pull/19292.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/19292/head:pull/19292

PR: https://git.openjdk.org/jdk/pull/19292


More information about the compiler-dev mailing list