Changes:
- The javac flag
-XDaddTypeAnnotationsToSymbol=trueis now required for Error Prone invocations on JDK 21, to enable the javac fix for JDK-8225377: type annotations are not visible to javac plugins across compilation boundaries. See #5426 for details. - Remove deprecated
valueattribute from@IncompatibleModifiersand@RequiredModifiers(#2122) - Error Prone API changes to encapsulate references to internal javac APIs for end position handling (
EndPosTable,DiagnosticPosition) (5440bb4, 06c2905, f3915ec)
New checks:
DuplicateAssertion: detect duplicated assertion lines where the argument toassertThatis pureIfChainToSwitch: suggest converting chains of if-statements into arrow switchesScannerUseDelimiter: discourageScanner.useDelimiter("\\A")AddNullMarkedToClass: refactoring to add@NullMarkedannotation to top level classes