Skip to content

Commit acaf7cb

Browse files
committed
build: decommission of ErrorProne
Removal of ErrorProne also fixes compilation on JDK 17 (see #1350 and #1556) The following issues won't be fixed: Closes #999 Closes #1069 Closes #1235 Closes #1440 Part of #1669
1 parent f8de532 commit acaf7cb

File tree

2 files changed

+1
-67
lines changed

2 files changed

+1
-67
lines changed

Diff for: pom.xml

-66
Original file line numberDiff line numberDiff line change
@@ -572,8 +572,6 @@
572572

573573
<dockerfile.plugin.version>1.4.6</dockerfile.plugin.version>
574574
<enforcer.plugin.version>3.0.0-M3</enforcer.plugin.version>
575-
<error-prone-javac.version>9+181-r4173-1</error-prone-javac.version>
576-
<error-prone.version>2.3.4</error-prone.version>
577575
<frontend.plugin.version>1.7.6</frontend.plugin.version>
578576
<gmavenplus.plugin.version>1.5</gmavenplus.plugin.version>
579577

@@ -887,35 +885,7 @@
887885
<failOnWarning>true</failOnWarning>
888886
<compilerArgs>
889887
<compilerArg>-Xlint:unchecked</compilerArg>
890-
<!-- Required for ErrorProne -->
891-
<!--
892-
@todo #971 Document ErrorProne tool
893-
-->
894-
<compilerArg>-XDcompilePolicy=simple</compilerArg>
895-
<!--
896-
@todo #1170 ErrorProne: activate experimental checks
897-
-->
898-
<!--
899-
The following checks have been disabled:
900-
- MissingOverride: produce false positives with @Getter from Lombok
901-
- MixedMutabilityReturnType: because I like to use Collections.empty*() methods
902-
- UnnecessaryAnonymousClass: I prefer to have an explicit implementation in a constant
903-
- PreferJavaTimeOverload: disabled because of false positives: https://github.com/google/error-prone/issues/1435
904-
-->
905-
<compilerArg>-Xplugin:ErrorProne -Xep:MissingOverride:OFF -Xep:MixedMutabilityReturnType:OFF -Xep:UnnecessaryAnonymousClass:OFF -Xep:PreferJavaTimeOverload:OFF</compilerArg>
906888
</compilerArgs>
907-
<annotationProcessorPaths>
908-
<path>
909-
<groupId>com.google.errorprone</groupId>
910-
<artifactId>error_prone_core</artifactId>
911-
<version>${error-prone.version}</version>
912-
</path>
913-
<path>
914-
<groupId>org.projectlombok</groupId>
915-
<artifactId>lombok</artifactId>
916-
<version>${lombok.version}</version>
917-
</path>
918-
</annotationProcessorPaths>
919889
</configuration>
920890
</plugin>
921891

@@ -1268,29 +1238,6 @@
12681238
</scm>
12691239

12701240
<profiles>
1271-
<profile>
1272-
<id>jdk8</id>
1273-
<activation>
1274-
<jdk>1.8</jdk>
1275-
</activation>
1276-
<build>
1277-
<plugins>
1278-
<plugin>
1279-
<groupId>org.apache.maven.plugins</groupId>
1280-
<artifactId>maven-compiler-plugin</artifactId>
1281-
<configuration>
1282-
<!-- Required for ErrorProne -->
1283-
<fork>true</fork>
1284-
<compilerArgs combine.children="append">
1285-
<compilerArg>
1286-
-J-Xbootclasspath/p:${settings.localRepository}/com/google/errorprone/javac/${error-prone-javac.version}/javac-${error-prone-javac.version}.jar
1287-
</compilerArg>
1288-
</compilerArgs>
1289-
</configuration>
1290-
</plugin>
1291-
</plugins>
1292-
</build>
1293-
</profile>
12941241
<profile>
12951242
<id>jdk11</id>
12961243
<activation>
@@ -1320,19 +1267,6 @@
13201267
<artifactId>maven-compiler-plugin</artifactId>
13211268
<configuration>
13221269
<release>17</release>
1323-
<fork>true</fork>
1324-
<compilerArgs combine.children="append">
1325-
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED</arg>
1326-
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED</arg>
1327-
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED</arg>
1328-
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED</arg>
1329-
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED</arg>
1330-
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED</arg>
1331-
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED</arg>
1332-
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED</arg>
1333-
<arg>-J--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED</arg>
1334-
<arg>-J--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED</arg>
1335-
</compilerArgs>
13361270
</configuration>
13371271
</plugin>
13381272
</plugins>

Diff for: src/main/java/ru/mystamps/web/feature/series/SeriesController.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -838,7 +838,7 @@ private static boolean isAllowedToAddingImages(SeriesDto series) {
838838
return series.getImageIds().size() <= series.getQuantity();
839839
}
840840

841-
// I like these parentheses and also ErrorProne suggests to have an explicit order
841+
// I like these parentheses
842842
@SuppressWarnings("PMD.UselessParentheses")
843843
private static boolean isUserCanAddImagesToSeries(
844844
Authentication authentication,

0 commit comments

Comments
 (0)