Refactor comment handling in tokenization to avoid extending javac's internal Comment. This prepares for upcoming JDK changes to the Comment API, which break the current subclass approach by changing the return type of Comment#getPos, see also similar changes to Error Prone in unknown commit
JCCompilationUnit#getImports no longer returns JCImport, as part of the changes for modular imports. Supporting modular imports is future work, this change just avoids a crash formatting the existing syntax on the latest JDK versions.
Prepare g-j-f for some internal javac API changes
Comment#getPos
, see also similar changes to Error Prone in unknown commitJCCompilationUnit#getImports
no longer returnsJCImport
, as part of the changes for modular imports. Supporting modular imports is future work, this change just avoids a crash formatting the existing syntax on the latest JDK versions.