Skip to content

Commit

Permalink
Tidy up spotbugs exclude filter
Browse files Browse the repository at this point in the history
  • Loading branch information
sebbASF committed Aug 8, 2020
1 parent 1a01c87 commit c8d04ca
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 97 deletions.
95 changes: 0 additions & 95 deletions findbugs-exclude-filter.xml

This file was deleted.

4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ file comparators, endian transformation classes, and much more.
</dependency>
</dependencies>
<configuration>
<excludeFilterFile>${basedir}/sb-excludes.xml</excludeFilterFile>
<excludeFilterFile>${basedir}/spotbugs-exclude-filter.xml</excludeFilterFile>
</configuration>
</plugin>
</plugins>
Expand All @@ -425,7 +425,7 @@ file comparators, endian transformation classes, and much more.
<artifactId>spotbugs-maven-plugin</artifactId>
<version>${spotbugs.plugin.version}</version>
<configuration>
<excludeFilterFile>${basedir}/sb-excludes.xml</excludeFilterFile>
<excludeFilterFile>${basedir}/spotbugs-exclude-filter.xml</excludeFilterFile>
</configuration>
</plugin>
</plugins>
Expand Down
19 changes: 19 additions & 0 deletions sb-excludes.xml → spotbugs-exclude-filter.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,24 @@
-->
<FindBugsFilter>

<!-- See discussion on https://issues.apache.org/jira/browse/IO-216 -->
<Match>
<Class name="org.apache.commons.io.output.LockableFileWriter" />
<Method name="close" params="" returns="void" />
<Bug pattern="RV_RETURN_VALUE_IGNORED_BAD_PRACTICE" />
</Match>

<!-- The constructors intentionally do not copy the input byte array -->
<Match>
<Class name="org.apache.commons.io.input.UnsynchronizedByteArrayInputStream" />
<Method name="&lt;init&gt;" />
<Bug pattern="EI_EXPOSE_REP2" />
</Match>

<!-- The encoding is irrelevant as output is binned -->
<Match>
<Class name="org.apache.commons.io.output.NullPrintStream" />
<Bug pattern="DM_DEFAULT_ENCODING" />
</Match>

</FindBugsFilter>

0 comments on commit c8d04ca

Please sign in to comment.