Skip to content

Commit 8611578

Browse files
committed
HADOOP-19731. Fix SpotBugs warnings introduced after SpotBugs version upgrade.
1 parent dd8fd7e commit 8611578

File tree

32 files changed

+401
-72
lines changed

32 files changed

+401
-72
lines changed
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<FindBugsFilter>
3+
<Match>
4+
<Bug pattern="AT_NONATOMIC_64BIT_PRIMITIVE,
5+
AT_NONATOMIC_OPERATIONS_ON_SHARED_VARIABLE,
6+
AT_STALE_THREAD_WRITE_OF_PRIMITIVE"/>
7+
</Match>
8+
<Match>
9+
<Bug pattern="CT_CONSTRUCTOR_THROW"/>
10+
</Match>
11+
<Match>
12+
<Bug pattern="EI_EXPOSE_REP,EI_EXPOSE_REP2"/>
13+
</Match>
14+
<Match>
15+
<Bug pattern="SING_SINGLETON_HAS_NONPRIVATE_CONSTRUCTOR"/>
16+
</Match>
17+
<Match>
18+
<Bug pattern="SING_SINGLETON_IMPLEMENTS_SERIALIZABLE"/>
19+
</Match>
20+
<Match>
21+
<Bug pattern="NN_NAKED_NOTIFY"/>
22+
</Match>
23+
<Match>
24+
<Bug pattern="MS_EXPOSE_REP"/>
25+
</Match>
26+
<Match>
27+
<Bug pattern="HSM_HIDING_METHOD"/>
28+
</Match>
29+
<Match>
30+
<Bug pattern="DMI_RANDOM_USED_ONLY_ONCE"/>
31+
</Match>
32+
<Match>
33+
<Bug pattern="DCN_NULLPOINTER_EXCEPTION"/>
34+
</Match>
35+
<Match>
36+
<Bug pattern="SSD_DO_NOT_USE_INSTANCE_LOCK_ON_SHARED_STATIC_DATA"/>
37+
</Match>
38+
<Match>
39+
<Bug pattern="ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD"/>
40+
</Match>
41+
<Match>
42+
<Bug pattern="PA_PUBLIC_PRIMITIVE_ATTRIBUTE"/>
43+
</Match>
44+
<Match>
45+
<Bug pattern="SS_SHOULD_BE_STATIC"/>
46+
</Match>
47+
<Match>
48+
<Bug pattern="EQ_DOESNT_OVERRIDE_EQUALS"/>
49+
</Match>
50+
<Match>
51+
<Bug pattern="REFLC_REFLECTION_MAY_INCREASE_ACCESSIBILITY_OF_CLASS"/>
52+
</Match>
53+
<Match>
54+
<Bug pattern="SING_SINGLETON_GETTER_NOT_SYNCHRONIZED"/>
55+
</Match>
56+
</FindBugsFilter>

hadoop-cloud-storage-project/hadoop-cos/pom.xml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,12 @@
6969
<artifactId>spotbugs-maven-plugin</artifactId>
7070
<configuration>
7171
<xmlOutput>true</xmlOutput>
72-
<excludeFilterFile>${basedir}/dev-support/findbugs-exclude.xml
73-
</excludeFilterFile>
72+
<excludeFilterFiles>
73+
<excludeFilterFile>${basedir}/dev-support/findbugs-exclude.xml
74+
</excludeFilterFile>
75+
<excludeFilterFile>${repo.root}/dev-support/findbugs-exclude-global.xml
76+
</excludeFilterFile>
77+
</excludeFilterFiles>
7478
<effort>Max</effort>
7579
</configuration>
7680
</plugin>

hadoop-cloud-storage-project/hadoop-huaweicloud/pom.xml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,12 @@
6464
<artifactId>spotbugs-maven-plugin</artifactId>
6565
<configuration>
6666
<xmlOutput>true</xmlOutput>
67-
<excludeFilterFile>${basedir}/dev-support/findbugs-exclude.xml
68-
</excludeFilterFile>
67+
<excludeFilterFiles>
68+
<excludeFilterFile>${basedir}/dev-support/findbugs-exclude.xml
69+
</excludeFilterFile>
70+
<excludeFilterFile>${repo.root}/dev-support/findbugs-exclude-global.xml
71+
</excludeFilterFile>
72+
</excludeFilterFiles>
6973
<effort>Max</effort>
7074
</configuration>
7175
</plugin>

hadoop-cloud-storage-project/hadoop-tos/pom.xml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,8 +184,12 @@
184184
<artifactId>spotbugs-maven-plugin</artifactId>
185185
<configuration>
186186
<xmlOutput>true</xmlOutput>
187-
<excludeFilterFile>${basedir}/dev-support/findbugs-exclude.xml
188-
</excludeFilterFile>
187+
<excludeFilterFiles>
188+
<excludeFilterFile>${basedir}/dev-support/findbugs-exclude.xml
189+
</excludeFilterFile>
190+
<excludeFilterFile>${repo.root}/dev-support/findbugs-exclude-global.xml
191+
</excludeFilterFile>
192+
</excludeFilterFiles>
189193
<effort>Max</effort>
190194
</configuration>
191195
</plugin>

hadoop-common-project/hadoop-auth/pom.xml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,11 @@
267267
<groupId>com.github.spotbugs</groupId>
268268
<artifactId>spotbugs-maven-plugin</artifactId>
269269
<configuration>
270-
<excludeFilterFile>${basedir}/dev-support/findbugsExcludeFile.xml</excludeFilterFile>
270+
<excludeFilterFiles>
271+
<excludeFilterFile>${basedir}/dev-support/findbugsExcludeFile.xml</excludeFilterFile>
272+
<excludeFilterFile>${repo.root}/dev-support/findbugs-exclude-global.xml
273+
</excludeFilterFile>
274+
</excludeFilterFiles>
271275
</configuration>
272276
</plugin>
273277
</plugins>

hadoop-common-project/hadoop-kms/pom.xml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,8 +244,12 @@
244244
<groupId>com.github.spotbugs</groupId>
245245
<artifactId>spotbugs-maven-plugin</artifactId>
246246
<configuration>
247-
<excludeFilterFile>${basedir}/dev-support/findbugsExcludeFile.xml
248-
</excludeFilterFile>
247+
<excludeFilterFiles>
248+
<excludeFilterFile>${basedir}/dev-support/findbugsExcludeFile.xml
249+
</excludeFilterFile>
250+
<excludeFilterFile>${repo.root}/dev-support/findbugs-exclude-global.xml
251+
</excludeFilterFile>
252+
</excludeFilterFiles>
249253
</configuration>
250254
</plugin>
251255
</plugins>

hadoop-common-project/hadoop-minikdc/pom.xml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,12 @@
7676
<groupId>com.github.spotbugs</groupId>
7777
<artifactId>spotbugs-maven-plugin</artifactId>
7878
<configuration>
79-
<excludeFilterFile>${basedir}/dev-support/findbugsExcludeFile.xml
80-
</excludeFilterFile>
79+
<excludeFilterFiles>
80+
<excludeFilterFile>${basedir}/dev-support/findbugsExcludeFile.xml
81+
</excludeFilterFile>
82+
<excludeFilterFile>${repo.root}/dev-support/findbugs-exclude-global.xml
83+
</excludeFilterFile>
84+
</excludeFilterFiles>
8185
</configuration>
8286
</plugin>
8387
</plugins>

hadoop-common-project/hadoop-nfs/pom.xml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,12 @@
125125
<groupId>com.github.spotbugs</groupId>
126126
<artifactId>spotbugs-maven-plugin</artifactId>
127127
<configuration>
128-
<excludeFilterFile>${basedir}/dev-support/findbugsExcludeFile.xml
129-
</excludeFilterFile>
128+
<excludeFilterFiles>
129+
<excludeFilterFile>${basedir}/dev-support/findbugsExcludeFile.xml
130+
</excludeFilterFile>
131+
<excludeFilterFile>${repo.root}/dev-support/findbugs-exclude-global.xml
132+
</excludeFilterFile>
133+
</excludeFilterFiles>
130134
</configuration>
131135
</plugin>
132136
</plugins>

hadoop-common-project/hadoop-registry/pom.xml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,12 @@
193193
<artifactId>spotbugs-maven-plugin</artifactId>
194194
<configuration>
195195
<xmlOutput>true</xmlOutput>
196-
<excludeFilterFile>${project.basedir}/dev-support/findbugs-exclude.xml</excludeFilterFile>
196+
<excludeFilterFiles>
197+
<excludeFilterFile>${project.basedir}/dev-support/findbugs-exclude.xml
198+
</excludeFilterFile>
199+
<excludeFilterFile>${repo.root}/dev-support/findbugs-exclude-global.xml
200+
</excludeFilterFile>
201+
</excludeFilterFiles>
197202
<effort>Max</effort>
198203
</configuration>
199204
</plugin>

hadoop-hdfs-project/hadoop-hdfs-httpfs/pom.xml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,11 @@
365365
<groupId>com.github.spotbugs</groupId>
366366
<artifactId>spotbugs-maven-plugin</artifactId>
367367
<configuration>
368-
<excludeFilterFile>${basedir}/dev-support/findbugsExcludeFile.xml</excludeFilterFile>
368+
<excludeFilterFiles>
369+
<excludeFilterFile>${basedir}/dev-support/findbugsExcludeFile.xml</excludeFilterFile>
370+
<excludeFilterFile>${repo.root}/dev-support/findbugs-exclude-global.xml
371+
</excludeFilterFile>
372+
</excludeFilterFiles>
369373
</configuration>
370374
</plugin>
371375
</plugins>
@@ -402,7 +406,7 @@
402406
</plugins>
403407
</build>
404408
</profile>
405-
409+
406410
<profile>
407411
<id>dist</id>
408412
<activation>

0 commit comments

Comments
 (0)