typetools / typetools/checker-framework
javac API change in Java 25 - Log.DiagnosticHandler
@smillst is already working on this.
Since Apr 14, 2025.
- Dominant language
- Java
- Stars
- 1.1k
- Forks
- 440
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 134
Description
The internal javac Log.DiagnosticHandler API changes in Java 25: https://github.com/openjdk/jdk/commit/4890b74c048a1472b87687294c316ecfb324e4ba
This affects code in javacutil/src/main/java/org/checkerframework/javacutil/Resolver.java
The diagnostic handler implementations switch from being static member classes to non-static inner classes, so e.g. new Log.DiscardDiagnosticHandler(log) needs to change to log. new DiscardDiagnosticHandler(log). Calling the constructor reflectively works with both versions, since either way it takes one argument for the log, whether that's the explicit parameter in Java < 25 or the synthetic enclosing instance parameter in Java >= 25.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.