`PlaceholderUnificationVisitor` using javac 21 API
Open
- Dominant language
- Java
- Stars
- 7.2k
- Forks
- 820
- Avg merge
- 5h 9m
- Merged PRs (30d)
- 50
Description
In f093681 the `PlaceholderUnificationVisitor` class was modified to call `CaseTree.getGuard()`:
https://github.com/google/error-prone/blob/cc12b63b439df353672c89d08acba3baa4c8b43f/core/src/main/java/com/google/errorprone/refaster/PlaceholderUnificationVisitor.java#L665
But, this API was only introduced in JDK 21:
https://github.com/openjdk/jdk/blob/9477c705c0bd5ce2d445abb5ca44d46656fc315f/src/jdk.compiler/share/classes/com/sun/source/tree/CaseTree.java#L78-L84
So I think this code will fail if it is run on JDK 17 (which Error Prone still supports). Maybe this wasn't detected on CI due to missing test coverage?
Contributor guide
Assessment
This issue has not been assessed yet.