You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by sl...@apache.org on 2026/10/02 04:10:51 UTC

(hadoop) branch trunk updated: HADOOP-19995. Fix the trunk SpotBugs warnings in hadoop-resourceestimator (#8772) Contributed by Jose Luis López

This is an automated email from the ASF dual-hosted git repository.

slfan1989 pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/hadoop.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 438a993cb52 HADOOP-19995. Fix the trunk SpotBugs warnings in hadoop-resourceestimator (#8772) Contributed by Jose Luis López
438a993cb52 is described below

commit 438a993cb52aa5738d2756f008cd1481f9b21fb0
Author: Jose Luis López López <jo...@gmail.com>
AuthorDate: Fri Oct 2 06:10:43 2026 +0200

    HADOOP-19995. Fix the trunk SpotBugs warnings in hadoop-resourceestimator (#8772) Contributed by Jose Luis López
    
    HADOOP-19731 created dev-support/findbugs-exclude-global.xml and wired it
    into the spotbugs plugin configuration of ~30 modules, but
    hadoop-resourceestimator was missed. As the only hadoop-tools module without
    a spotbugs plugin configuration, it inherits the root plugin with no exclude
    filters, so CT_CONSTRUCTOR_THROW and EI_EXPOSE_REP/EI_EXPOSE_REP2 findings
    are reported as errors and turn red every precommit that touches this module
    (e.g. PR #8704 / HADOOP-19972).
    
    This adds the spotbugs plugin configuration to the module pom, pointing at
    the shared global exclude file like the sibling modules do. No code changes.
    
    Verified locally: mvn -pl hadoop-tools/hadoop-resourceestimator
    compile spotbugs:check -> 0 findings (was: 12 bugs, BUILD FAILURE without
    this change). Module unit tests: 47 run, 0 failures.
    
    Co-authored-by: Shilun Fan <sl...@apache.org>
    Signed-off-by: Shilun Fan <sl...@apache.org>
---
 hadoop-tools/hadoop-resourceestimator/pom.xml | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/hadoop-tools/hadoop-resourceestimator/pom.xml b/hadoop-tools/hadoop-resourceestimator/pom.xml
index 5bd5db3d542..2f88db06db3 100644
--- a/hadoop-tools/hadoop-resourceestimator/pom.xml
+++ b/hadoop-tools/hadoop-resourceestimator/pom.xml
@@ -113,6 +113,16 @@
                     <configLocation>src/config/checkstyle.xml</configLocation>
                 </configuration>
             </plugin>
+            <plugin>
+                <groupId>com.github.spotbugs</groupId>
+                <artifactId>spotbugs-maven-plugin</artifactId>
+                <configuration>
+                    <xmlOutput>true</xmlOutput>
+                    <excludeFilterFiles>
+                        <excludeFilterFile>${maven.multiModuleProjectDirectory}/dev-support/findbugs-exclude-global.xml</excludeFilterFile>
+                    </excludeFilterFiles>
+                </configuration>
+            </plugin>
         </plugins>
     </build>
 


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org