DaanHoogland opened a new issue, #11438: URL: https://github.com/apache/cloudstack/issues/11438
go through the code by instating error prone and fix any issues it reports. Once that epic work is done we can permanently install errorprone as a pre-commit hook. ``` commit 9f9a2b6b7e094537fea75f633d355f983d4c15d7 Author: Daan Hoogland <d...@onecht.net> Date: Thu Jan 12 19:32:35 2023 +0100 errorprone diff --git a/pom.xml b/pom.xml index 204c74cc76..13c46d7521 100644 --- a/pom.xml +++ b/pom.xml @@ -817,6 +817,32 @@ </execution> </executions> </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <version>${cs.compiler-plugin.version}</version> + <configuration> + <source>8</source> + <target>8</target> + <encoding>UTF-8</encoding> + <compilerArgs> + <arg>-XDcompilePolicy=simple</arg> + <arg>-Xplugin:ErrorProne</arg> + </compilerArgs> + <annotationProcessorPaths> + <path> + <groupId>com.google.errorprone</groupId> + <artifactId>error_prone_core</artifactId> + <version>2.18.0</version> + </path> + <!-- Other annotation processors go here. + + If 'annotationProcessorPaths' is set, processors will no longer be + discovered on the regular -classpath; see also 'Using Error Prone + together with other annotation processors' below. --> + </annotationProcessorPaths> + </configuration> + </plugin> </plugins> <pluginManagement> <plugins> @@ -1074,15 +1100,26 @@ <configuration> <source>${cs.jdk.version}</source> <target>${cs.jdk.version}</target> - <fork>true</fork> - <meminitial>128m</meminitial> - <maxmem>512m</maxmem> + <encoding>UTF-8</encoding> <compilerArgs> <arg>-XDignore.symbol.file=true</arg> <arg>--add-opens=java.base/java.lang=ALL-UNNAMED</arg> <arg>--add-exports=java.base/sun.security.x509=ALL-UNNAMED</arg> <arg>--add-exports=java.base/sun.security.provider=ALL-UNNAMED</arg> + <arg>-XDcompilePolicy=simple</arg> + <arg>-Xplugin:ErrorProne</arg> + <arg>--illegal-access=warn</arg> </compilerArgs> + <annotationProcessorPaths> + <path> + <groupId>com.google.errorprone</groupId> + <artifactId>error_prone_core</artifactId> + <version>2.18.0</version> + </path> + </annotationProcessorPaths> + <fork>true</fork> + <meminitial>128m</meminitial> + <maxmem>512m</maxmem> </configuration> </plugin> <plugin> ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org