From 85c74735cc1861d4ff5f74f03dba01967b1bc51c Mon Sep 17 00:00:00 2001 From: David Phillips Date: Tue, 12 Oct 2021 02:09:36 -0700 Subject: [PATCH] Configure Error Prone for newer JDKs --- pom.xml | 58 +++++++++++++++++++++++++++++++++------------------------ 1 file changed, 34 insertions(+), 24 deletions(-) diff --git a/pom.xml b/pom.xml index 47ce41ceca11..0fa0c753f154 100644 --- a/pom.xml +++ b/pom.xml @@ -1701,35 +1701,45 @@ maven-compiler-plugin + + true -XDcompilePolicy=simple - -Xplugin:ErrorProne + -Xplugin:ErrorProne \ + \ + \ + -Xep:GuardedBy:OFF \ + -Xep:HashtableContains:OFF \ + -Xep:BadInstanceof:ERROR \ + -Xep:BoxedPrimitiveConstructor:ERROR \ + -Xep:ClassCanBeStatic:ERROR \ + -Xep:CompareToZero:ERROR \ + -Xep:EqualsIncompatibleType:ERROR \ + -Xep:FallThrough:ERROR \ + -Xep:ImmutableSetForContains:ERROR \ + -Xep:InconsistentHashCode:ERROR \ + -Xep:InjectOnConstructorOfAbstractClass:ERROR \ + -Xep:MissingCasesInEnumSwitch:ERROR \ + -Xep:MissingOverride:ERROR \ + -Xep:NullOptional:ERROR \ + -Xep:ObjectToString:ERROR \ + -Xep:UnnecessaryMethodReference:ERROR \ + -Xep:UnnecessaryOptionalGet:ERROR \ + -Xep:UnusedVariable:ERROR \ + -Xep:UseEnumSwitch:ERROR \ -XepExcludedPaths:.*/target/generated-(|test-)sources/.* - - - - -Xep:GuardedBy:OFF - -Xep:HashtableContains:OFF - - -Xep:BadInstanceof:ERROR - -Xep:BoxedPrimitiveConstructor:ERROR - -Xep:ClassCanBeStatic:ERROR - -Xep:CompareToZero:ERROR - -Xep:EqualsIncompatibleType:ERROR - -Xep:FallThrough:ERROR - -Xep:ImmutableSetForContains:ERROR - -Xep:InconsistentHashCode:ERROR - -Xep:InjectOnConstructorOfAbstractClass:ERROR - -Xep:MissingCasesInEnumSwitch:ERROR - -Xep:MissingOverride:ERROR - -Xep:NullOptional:ERROR - -Xep:ObjectToString:ERROR - -Xep:UnnecessaryMethodReference:ERROR - -Xep:UnnecessaryOptionalGet:ERROR - -Xep:UnusedVariable:ERROR - -Xep:UseEnumSwitch:ERROR + -J--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED + -J--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED + -J--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED