Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 69 additions & 0 deletions dev-support/findbugs-exclude-global.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. See accompanying LICENSE file.
-->
<FindBugsFilter>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to add the Apache License notice.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the feedback—I’ll make the updates right away!

<Match>
<Bug pattern="AT_NONATOMIC_64BIT_PRIMITIVE,
AT_NONATOMIC_OPERATIONS_ON_SHARED_VARIABLE,
AT_STALE_THREAD_WRITE_OF_PRIMITIVE"/>
</Match>
<Match>
<Bug pattern="CT_CONSTRUCTOR_THROW"/>
</Match>
<Match>
<Bug pattern="EI_EXPOSE_REP,EI_EXPOSE_REP2"/>
</Match>
<Match>
<Bug pattern="SING_SINGLETON_HAS_NONPRIVATE_CONSTRUCTOR"/>
</Match>
<Match>
<Bug pattern="SING_SINGLETON_IMPLEMENTS_SERIALIZABLE"/>
</Match>
<Match>
<Bug pattern="NN_NAKED_NOTIFY"/>
</Match>
<Match>
<Bug pattern="MS_EXPOSE_REP"/>
</Match>
<Match>
<Bug pattern="HSM_HIDING_METHOD"/>
</Match>
<Match>
<Bug pattern="DMI_RANDOM_USED_ONLY_ONCE"/>
</Match>
<Match>
<Bug pattern="DCN_NULLPOINTER_EXCEPTION"/>
</Match>
<Match>
<Bug pattern="SSD_DO_NOT_USE_INSTANCE_LOCK_ON_SHARED_STATIC_DATA"/>
</Match>
<Match>
<Bug pattern="ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD"/>
</Match>
<Match>
<Bug pattern="PA_PUBLIC_PRIMITIVE_ATTRIBUTE"/>
</Match>
<Match>
<Bug pattern="SS_SHOULD_BE_STATIC"/>
</Match>
<Match>
<Bug pattern="EQ_DOESNT_OVERRIDE_EQUALS"/>
</Match>
<Match>
<Bug pattern="REFLC_REFLECTION_MAY_INCREASE_ACCESSIBILITY_OF_CLASS"/>
</Match>
<Match>
<Bug pattern="SING_SINGLETON_GETTER_NOT_SYNCHRONIZED"/>
</Match>
</FindBugsFilter>
8 changes: 6 additions & 2 deletions hadoop-cloud-storage-project/hadoop-cos/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,12 @@
<artifactId>spotbugs-maven-plugin</artifactId>
<configuration>
<xmlOutput>true</xmlOutput>
<excludeFilterFile>${basedir}/dev-support/findbugs-exclude.xml
</excludeFilterFile>
<excludeFilterFiles>
<excludeFilterFile>${basedir}/dev-support/findbugs-exclude.xml
</excludeFilterFile>
<excludeFilterFile>${repo.root}/dev-support/findbugs-exclude-global.xml
</excludeFilterFile>
</excludeFilterFiles>
<effort>Max</effort>
</configuration>
</plugin>
Expand Down
8 changes: 6 additions & 2 deletions hadoop-cloud-storage-project/hadoop-huaweicloud/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,12 @@
<artifactId>spotbugs-maven-plugin</artifactId>
<configuration>
<xmlOutput>true</xmlOutput>
<excludeFilterFile>${basedir}/dev-support/findbugs-exclude.xml
</excludeFilterFile>
<excludeFilterFiles>
<excludeFilterFile>${basedir}/dev-support/findbugs-exclude.xml
</excludeFilterFile>
<excludeFilterFile>${repo.root}/dev-support/findbugs-exclude-global.xml
</excludeFilterFile>
</excludeFilterFiles>
<effort>Max</effort>
</configuration>
</plugin>
Expand Down
8 changes: 6 additions & 2 deletions hadoop-cloud-storage-project/hadoop-tos/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,12 @@
<artifactId>spotbugs-maven-plugin</artifactId>
<configuration>
<xmlOutput>true</xmlOutput>
<excludeFilterFile>${basedir}/dev-support/findbugs-exclude.xml
</excludeFilterFile>
<excludeFilterFiles>
<excludeFilterFile>${basedir}/dev-support/findbugs-exclude.xml
</excludeFilterFile>
<excludeFilterFile>${repo.root}/dev-support/findbugs-exclude-global.xml
</excludeFilterFile>
</excludeFilterFiles>
<effort>Max</effort>
</configuration>
</plugin>
Expand Down
6 changes: 5 additions & 1 deletion hadoop-common-project/hadoop-auth/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,11 @@
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<configuration>
<excludeFilterFile>${basedir}/dev-support/findbugsExcludeFile.xml</excludeFilterFile>
<excludeFilterFiles>
<excludeFilterFile>${basedir}/dev-support/findbugsExcludeFile.xml</excludeFilterFile>
<excludeFilterFile>${repo.root}/dev-support/findbugs-exclude-global.xml
</excludeFilterFile>
</excludeFilterFiles>
</configuration>
</plugin>
</plugins>
Expand Down
8 changes: 6 additions & 2 deletions hadoop-common-project/hadoop-kms/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,12 @@
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<configuration>
<excludeFilterFile>${basedir}/dev-support/findbugsExcludeFile.xml
</excludeFilterFile>
<excludeFilterFiles>
<excludeFilterFile>${basedir}/dev-support/findbugsExcludeFile.xml
</excludeFilterFile>
<excludeFilterFile>${repo.root}/dev-support/findbugs-exclude-global.xml
</excludeFilterFile>
</excludeFilterFiles>
</configuration>
</plugin>
</plugins>
Expand Down
8 changes: 6 additions & 2 deletions hadoop-common-project/hadoop-minikdc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,12 @@
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<configuration>
<excludeFilterFile>${basedir}/dev-support/findbugsExcludeFile.xml
</excludeFilterFile>
<excludeFilterFiles>
<excludeFilterFile>${basedir}/dev-support/findbugsExcludeFile.xml
</excludeFilterFile>
<excludeFilterFile>${repo.root}/dev-support/findbugs-exclude-global.xml
</excludeFilterFile>
</excludeFilterFiles>
</configuration>
</plugin>
</plugins>
Expand Down
8 changes: 6 additions & 2 deletions hadoop-common-project/hadoop-nfs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,12 @@
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<configuration>
<excludeFilterFile>${basedir}/dev-support/findbugsExcludeFile.xml
</excludeFilterFile>
<excludeFilterFiles>
<excludeFilterFile>${basedir}/dev-support/findbugsExcludeFile.xml
</excludeFilterFile>
<excludeFilterFile>${repo.root}/dev-support/findbugs-exclude-global.xml
</excludeFilterFile>
</excludeFilterFiles>
</configuration>
</plugin>
</plugins>
Expand Down
7 changes: 6 additions & 1 deletion hadoop-common-project/hadoop-registry/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,12 @@
<artifactId>spotbugs-maven-plugin</artifactId>
<configuration>
<xmlOutput>true</xmlOutput>
<excludeFilterFile>${project.basedir}/dev-support/findbugs-exclude.xml</excludeFilterFile>
<excludeFilterFiles>
<excludeFilterFile>${project.basedir}/dev-support/findbugs-exclude.xml
</excludeFilterFile>
<excludeFilterFile>${repo.root}/dev-support/findbugs-exclude-global.xml
</excludeFilterFile>
</excludeFilterFiles>
<effort>Max</effort>
</configuration>
</plugin>
Expand Down
6 changes: 5 additions & 1 deletion hadoop-hdfs-project/hadoop-hdfs-httpfs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,11 @@
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<configuration>
<excludeFilterFile>${basedir}/dev-support/findbugsExcludeFile.xml</excludeFilterFile>
<excludeFilterFiles>
<excludeFilterFile>${basedir}/dev-support/findbugsExcludeFile.xml</excludeFilterFile>
<excludeFilterFile>${repo.root}/dev-support/findbugs-exclude-global.xml
</excludeFilterFile>
</excludeFilterFiles>
</configuration>
</plugin>
</plugins>
Expand Down
16 changes: 16 additions & 0 deletions hadoop-hdfs-project/hadoop-hdfs-nfs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -239,4 +239,20 @@ https://maven.apache.org/xsd/maven-4.0.0.xsd">
</profile>
</profiles>

<build>
<plugins>
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<configuration>
<excludeFilterFiles>
<excludeFilterFile>
${repo.root}/dev-support/findbugs-exclude-global.xml
</excludeFilterFile>
</excludeFilterFiles>
</configuration>
</plugin>
</plugins>
</build>

</project>
58 changes: 56 additions & 2 deletions hadoop-mapreduce-project/dev-support/findbugs-exclude.xml
Original file line number Diff line number Diff line change
Expand Up @@ -401,15 +401,15 @@
<Bug pattern="ICAST_QUESTIONABLE_UNSIGNED_RIGHT_SHIFT" />
</Match>

<!--
<!--
False positive of FindBugs complaining that initializationPoller and
started were accessed through
CapacitySchedulerQueueRefresher.refreshQueues without explicitly holding
the lock of CapacityTaskScheduler. The lock is in fact acquired by
JobTracker prior to calling QueueManager.refereshQueues - this is
necessary to ensure the order of locking (TaskScheduler ->
QueueManager).
-->
-->
<Match>
<Class name="org.apache.hadoop.mapred.CapacityTaskScheduler" />
<Field name="initializationPoller" />
Expand Down Expand Up @@ -554,4 +554,58 @@
<Method name="onSuccess" />
<Bug pattern="NP_PARAMETER_MUST_BE_NONNULL_BUT_MARKED_AS_NULLABLE" />
</Match>

<Match>
<Class name="org.apache.hadoop.mapreduce.v2.util.MRApps" />
<Method name="setupDistributedCacheLocal" />
<Bug pattern="ENV_USE_PROPERTY_INSTEAD_OF_ENV" />
</Match>

<Match>
<Class name="org.apache.hadoop.mapreduce.jobhistory.JobSubmitted" />
<Method name="customDecode" />
<Bug pattern="SF_SWITCH_FALLTHROUGH" />
</Match>

<Match>
<Class name="org.apache.hadoop.mapreduce.jobhistory.MapAttemptFinished" />
<Method name="customDecode" />
<Bug pattern="SF_SWITCH_FALLTHROUGH" />
</Match>

<Match>
<Class name="org.apache.hadoop.mapreduce.jobhistory.ReduceAttemptFinished" />
<Method name="customDecode" />
<Bug pattern="SF_SWITCH_FALLTHROUGH" />
</Match>

<Match>
<Class name="org.apache.hadoop.mapreduce.jobhistory.TaskAttemptUnsuccessfulCompletion" />
<Method name="customDecode" />
<Bug pattern="SF_SWITCH_FALLTHROUGH" />
</Match>

<Match>
<Class name="org.apache.hadoop.mapreduce.util.ProcessTree" />
<Method name="isSetsidSupported" />
<Bug pattern="NP_NULL_ON_SOME_PATH_EXCEPTION" />
</Match>

<Match>
<Class name="org.apache.hadoop.mapreduce.util.ProcessTree" />
<Method name="isProcessGroupAlive" />
<Bug pattern="NP_NULL_ON_SOME_PATH_EXCEPTION" />
</Match>

<Match>
<Class name="org.apache.hadoop.mapreduce.lib.db.DataDrivenDBInputFormat" />
<Method name="getSplits" />
<Bug pattern="OBL_UNSATISFIED_OBLIGATION_EXCEPTION_EDGE" />
</Match>

<Match>
<Class name="org.apache.hadoop.mapreduce.v2.app.rm.RMContainerAllocator" />
<Field name="containersReleased" />
<Bug pattern="IS2_INCONSISTENT_SYNC" />
</Match>
</FindBugsFilter>
6 changes: 5 additions & 1 deletion hadoop-mapreduce-project/hadoop-mapreduce-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,11 @@
<artifactId>spotbugs-maven-plugin</artifactId>
<configuration>
<xmlOutput>true</xmlOutput>
<excludeFilterFile>${mr.basedir}/dev-support/findbugs-exclude.xml</excludeFilterFile>
<excludeFilterFiles>
<excludeFilterFile>${mr.basedir}/dev-support/findbugs-exclude.xml</excludeFilterFile>
<excludeFilterFile>${repo.root}/dev-support/findbugs-exclude-global.xml
</excludeFilterFile>
</excludeFilterFiles>
<effort>Max</effort>
</configuration>
</plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@
<Bug pattern="OBL_UNSATISFIED_OBLIGATION" />
</Match>

<Match>
<Class name="org.apache.hadoop.examples.DBCountPageView" />
<Method name="verify" />
<Bug pattern="OBL_UNSATISFIED_OBLIGATION_EXCEPTION_EDGE" />
</Match>

<!-- Ignore the irrelevant closure warnings-->
<Match>
<Class name="org.apache.hadoop.examples.dancing.Pentomino$Piece" />
Expand Down
7 changes: 6 additions & 1 deletion hadoop-mapreduce-project/hadoop-mapreduce-examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,12 @@
<artifactId>spotbugs-maven-plugin</artifactId>
<configuration>
<xmlOutput>true</xmlOutput>
<excludeFilterFile>${mr.examples.basedir}/dev-support/findbugs-exclude.xml</excludeFilterFile>
<excludeFilterFiles>
<excludeFilterFile>${mr.examples.basedir}/dev-support/findbugs-exclude.xml
</excludeFilterFile>
<excludeFilterFile>${repo.root}/dev-support/findbugs-exclude-global.xml
</excludeFilterFile>
</excludeFilterFiles>
<effort>Max</effort>
</configuration>
</plugin>
Expand Down
6 changes: 5 additions & 1 deletion hadoop-mapreduce-project/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,11 @@
<artifactId>spotbugs-maven-plugin</artifactId>
<configuration>
<xmlOutput>true</xmlOutput>
<excludeFilterFile>${mr.basedir}/dev-support/findbugs-exclude.xml</excludeFilterFile>
<excludeFilterFiles>
<excludeFilterFile>${mr.basedir}/dev-support/findbugs-exclude.xml</excludeFilterFile>
<excludeFilterFile>${repo.root}/dev-support/findbugs-exclude-global.xml
</excludeFilterFile>
</excludeFilterFiles>
<effort>Max</effort>
</configuration>
</plugin>
Expand Down
5 changes: 4 additions & 1 deletion hadoop-project-dist/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,10 @@
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<configuration>
<excludeFilterFile>${basedir}/dev-support/findbugsExcludeFile.xml</excludeFilterFile>
<excludeFilterFiles>
<excludeFilterFile>${basedir}/dev-support/findbugsExcludeFile.xml</excludeFilterFile>
<excludeFilterFile>${repo.root}/dev-support/findbugs-exclude-global.xml</excludeFilterFile>
</excludeFilterFiles>
<maxHeap>2048</maxHeap>
</configuration>
</plugin>
Expand Down
17 changes: 17 additions & 0 deletions hadoop-project/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2633,6 +2633,23 @@
<groupId>com.google.code.maven-replacer-plugin</groupId>
<artifactId>replacer</artifactId>
</plugin>
<plugin>
<groupId>org.commonjava.maven.plugins</groupId>
<artifactId>directory-maven-plugin</artifactId>
<version>1.0</version>
<executions>
<execution>
<id>calc-repo-root</id>
<goals>
<goal>highest-basedir</goal>
</goals>
<phase>initialize</phase>
<configuration>
<property>repo.root</property>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

Expand Down
Loading