This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-pool.git
commit 9124dede0e74bb9ed6f1aef21f61891b8d1fad9d Author: Gary Gregory <[email protected]> AuthorDate: Sun Jul 26 11:20:17 2020 -0400 Replace FindBugs with SpotBugs. --- findbugs-exclude-filter.xml | 11 +++++------ pom.xml | 29 ++++++++++++++++++++--------- 2 files changed, 25 insertions(+), 15 deletions(-) diff --git a/findbugs-exclude-filter.xml b/findbugs-exclude-filter.xml index 01a38a1..ab49c78 100644 --- a/findbugs-exclude-filter.xml +++ b/findbugs-exclude-filter.xml @@ -78,14 +78,13 @@ <Bug code="DE" /> </Match> <Match> - <!-- Swallowing exception is deliberate design choice --> + <!-- TODO, Is this a real issue? --> <Class name="org.apache.commons.pool2.impl.SoftReferenceObjectPool" /> <Or> - <Method name="addObject" /> - <Method name="clear" /> - <Method name="returnObject" /> + <Field name="createCount" /> + <Field name="numActive" /> </Or> - <Bug code="DE" /> + <Bug pattern="IS2_INCONSISTENT_SYNC" /> </Match> <!-- TEST CODE --> @@ -129,7 +128,7 @@ <!-- they are the same object --> <Class name="org.apache.commons.pool2.impl.TestGenericKeyedObjectPool" /> <Method name="testMaxTotalLRU" /> - <bug pattern="ES_COMPARING_STRINGS_WITH_EQ" /> + <Bug pattern="ES_COMPARING_STRINGS_WITH_EQ" /> </Match> <Match> <!-- Exception is ignored as earlier exception is more important --> diff --git a/pom.xml b/pom.xml index dad3200..c312a6f 100644 --- a/pom.xml +++ b/pom.xml @@ -182,6 +182,8 @@ <commons.animal-sniffer.version>1.19</commons.animal-sniffer.version> <commons.checkstyle-plugin.version>3.1.1</commons.checkstyle-plugin.version> <commons.felix.version>5.1.1</commons.felix.version> + <spotbugs.plugin.version>4.0.4</spotbugs.plugin.version> + <spotbugs.impl.version>4.0.6</spotbugs.impl.version> <!-- Commons Release Plugin --> <commons.bc.version>2.8.0</commons.bc.version> @@ -196,7 +198,7 @@ </properties> <build> - <defaultGoal>clean verify apache-rat:check checkstyle:check japicmp:cmp javadoc:javadoc</defaultGoal> + <defaultGoal>clean verify apache-rat:check checkstyle:check japicmp:cmp javadoc:javadoc spotbugs:check</defaultGoal> <pluginManagement> <plugins> <plugin> @@ -243,6 +245,21 @@ <headerLocation>${basedir}/license-header.txt</headerLocation> </configuration> </plugin> + <plugin> + <groupId>com.github.spotbugs</groupId> + <artifactId>spotbugs-maven-plugin</artifactId> + <version>${spotbugs.plugin.version}</version> + <dependencies> + <dependency> + <groupId>com.github.spotbugs</groupId> + <artifactId>spotbugs</artifactId> + <version>${spotbugs.impl.version}</version> + </dependency> + </dependencies> + <configuration> + <excludeFilterFile>${basedir}/findbugs-exclude-filter.xml</excludeFilterFile> + </configuration> + </plugin> </plugins> </pluginManagement> <plugins> @@ -350,14 +367,8 @@ <artifactId>maven-checkstyle-plugin</artifactId> </plugin> <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>findbugs-maven-plugin</artifactId> - <version>3.0.5</version> - <configuration> - <threshold>Normal</threshold> - <effort>Default</effort> - <excludeFilterFile>${basedir}/findbugs-exclude-filter.xml</excludeFilterFile> - </configuration> + <groupId>com.github.spotbugs</groupId> + <artifactId>spotbugs-maven-plugin</artifactId> </plugin> <plugin> <groupId>org.apache.rat</groupId>
