Skip to content

Commit c8d04ca

Browse files
committed
Tidy up spotbugs exclude filter
1 parent 1a01c87 commit c8d04ca

3 files changed

Lines changed: 21 additions & 97 deletions

File tree

findbugs-exclude-filter.xml

Lines changed: 0 additions & 95 deletions
This file was deleted.

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ file comparators, endian transformation classes, and much more.
403403
</dependency>
404404
</dependencies>
405405
<configuration>
406-
<excludeFilterFile>${basedir}/sb-excludes.xml</excludeFilterFile>
406+
<excludeFilterFile>${basedir}/spotbugs-exclude-filter.xml</excludeFilterFile>
407407
</configuration>
408408
</plugin>
409409
</plugins>
@@ -425,7 +425,7 @@ file comparators, endian transformation classes, and much more.
425425
<artifactId>spotbugs-maven-plugin</artifactId>
426426
<version>${spotbugs.plugin.version}</version>
427427
<configuration>
428-
<excludeFilterFile>${basedir}/sb-excludes.xml</excludeFilterFile>
428+
<excludeFilterFile>${basedir}/spotbugs-exclude-filter.xml</excludeFilterFile>
429429
</configuration>
430430
</plugin>
431431
</plugins>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,24 @@
1717
-->
1818
<FindBugsFilter>
1919

20+
<!-- See discussion on https://issues.apache.org/jira/browse/IO-216 -->
21+
<Match>
22+
<Class name="org.apache.commons.io.output.LockableFileWriter" />
23+
<Method name="close" params="" returns="void" />
24+
<Bug pattern="RV_RETURN_VALUE_IGNORED_BAD_PRACTICE" />
25+
</Match>
26+
27+
<!-- The constructors intentionally do not copy the input byte array -->
28+
<Match>
29+
<Class name="org.apache.commons.io.input.UnsynchronizedByteArrayInputStream" />
30+
<Method name="&lt;init&gt;" />
31+
<Bug pattern="EI_EXPOSE_REP2" />
32+
</Match>
33+
34+
<!-- The encoding is irrelevant as output is binned -->
35+
<Match>
36+
<Class name="org.apache.commons.io.output.NullPrintStream" />
37+
<Bug pattern="DM_DEFAULT_ENCODING" />
38+
</Match>
2039

2140
</FindBugsFilter>

0 commit comments

Comments
 (0)