DaanHoogland opened a new pull request, #7088:
URL: https://github.com/apache/cloudstack/pull/7088

   ### Description
   
   This PR applies errorprone as in below diff and applies the suggested 
changes for the first few projects. The permanent application of errorProne is 
removed within the scope of this PR as most projects will give positives.
   
   ```
   commit 9f9a2b6b7e094537fea75f633d355f983d4c15d7
   Author: Daan Hoogland <[email protected]>
   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>
   ```
   <!--- Describe your changes in DETAIL - And how has behaviour functionally 
changed. -->
   
   <!-- For new features, provide link to FS, dev ML discussion etc. -->
   <!-- In case of bug fix, the expected and actual behaviours, steps to 
reproduce. -->
   
   <!-- When "Fixes: #<id>" is specified, the issue/PR will automatically be 
closed when this PR gets merged -->
   <!-- For addressing multiple issues/PRs, use multiple "Fixes: #<id>" -->
   <!-- Fixes: # -->
   
   <!--- 
*********************************************************************************
 -->
   <!--- NOTE: AUTOMATATION USES THE DESCRIPTIONS TO SET LABELS AND PRODUCE 
DOCUMENTATION. -->
   <!--- PLEASE PUT AN 'X' in only **ONE** box -->
   <!--- 
*********************************************************************************
 -->
   
   ### Types of changes
   
   - [ ] Breaking change (fix or feature that would cause existing 
functionality to change)
   - [ ] New feature (non-breaking change which adds functionality)
   - [ ] Bug fix (non-breaking change which fixes an issue)
   - [ ] Enhancement (improves an existing feature and functionality)
   - [ ] Cleanup (Code refactoring and cleanup, that may add test cases)
   - [x] CI/build
   ### Feature/Enhancement Scale or Bug Severity
   
   #### Feature/Enhancement Scale
   
   - [x] Major
   - [ ] Minor
   
   #### Bug Severity
   
   - [ ] BLOCKER
   - [ ] Critical
   - [ ] Major
   - [x] Minor
   - [ ] Trivial
   
   
   ### Screenshots (if appropriate):
   
   
   ### How Has This Been Tested?
   <!-- Please describe in detail how you tested your changes. -->
   <!-- Include details of your testing environment, and the tests you ran to 
-->
   <!-- see how your change affects other areas of the code, etc. -->
   
   
   <!-- Please read the 
[CONTRIBUTING](https://github.com/apache/cloudstack/blob/main/CONTRIBUTING.md) 
document -->
   Testing should be usual regression and monkey testing


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to