You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2022/07/03 11:05:35 UTC

[commons-pool] branch master updated (4c86763f -> 25c8ba9d)

This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/commons-pool.git


    from 4c86763f Add PMD check to default Maven goal
     new df7bc26f Move some build configuration files from the root to the src/conf folder
     new 25c8ba9d Add PMD CPD check to default Maven goal

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 pom.xml                                            |   6 +-
 checkstyle.xml => src/conf/checkstyle.xml          | 162 ++++----
 .../conf/findbugs-exclude-filter.xml               | 410 ++++++++++-----------
 3 files changed, 289 insertions(+), 289 deletions(-)
 rename checkstyle.xml => src/conf/checkstyle.xml (97%)
 rename findbugs-exclude-filter.xml => src/conf/findbugs-exclude-filter.xml (97%)


[commons-pool] 01/02: Move some build configuration files from the root to the src/conf folder

Posted by gg...@apache.org.
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 df7bc26fc60327ea1f2a2a7ace94871419670284
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sat Jul 2 20:14:35 2022 -0400

    Move some build configuration files from the root to the src/conf folder
---
 pom.xml                                            |   4 +-
 checkstyle.xml => src/conf/checkstyle.xml          | 162 ++++----
 .../conf/findbugs-exclude-filter.xml               | 410 ++++++++++-----------
 3 files changed, 288 insertions(+), 288 deletions(-)

diff --git a/pom.xml b/pom.xml
index 5da5b9b8..fb4358ef 100644
--- a/pom.xml
+++ b/pom.xml
@@ -260,7 +260,7 @@
               </dependency>
             </dependencies>
             <configuration>
-              <configLocation>${basedir}/checkstyle.xml</configLocation>
+              <configLocation>${basedir}/src/conf/checkstyle.xml</configLocation>
               <enableRulesSummary>false</enableRulesSummary>
               <headerLocation>${basedir}/license-header.txt</headerLocation>
             </configuration>
@@ -277,7 +277,7 @@
               </dependency>
             </dependencies>
             <configuration>
-              <excludeFilterFile>${basedir}/findbugs-exclude-filter.xml</excludeFilterFile>
+              <excludeFilterFile>${basedir}/src/conf/findbugs-exclude-filter.xml</excludeFilterFile>
             </configuration>
           </plugin>
         </plugins>
diff --git a/checkstyle.xml b/src/conf/checkstyle.xml
similarity index 97%
rename from checkstyle.xml
rename to src/conf/checkstyle.xml
index 3f884e11..4fed6da0 100644
--- a/checkstyle.xml
+++ b/src/conf/checkstyle.xml
@@ -1,81 +1,81 @@
-<?xml version="1.0"?>
-<!--
-   Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements.  See the NOTICE file distributed with
-  this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You 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.
--->
-<!DOCTYPE module PUBLIC
-    "-//Checkstyle//DTD Checkstyle Configuration 1.2//EN"
-    "https://checkstyle.org/dtds/configuration_1_2.dtd">
-
-<!--
-  Checkstyle checks configured for Maven.
--->
-
-<module name="Checker">
-
-  <property name="localeLanguage" value="en"/>
-
-  <!-- No tabs allowed! -->
-  <module name="FileTabCharacter"/>
-    
-  <module name="TreeWalker">
-   
-    <!-- Operator must be at end of wrapped line -->
-    <module name="OperatorWrap">
-      <property name="option" value="eol"/>
-    </module>
-    
-    <!-- Interfaces must be types (not just constants) -->
-    <module name="InterfaceIsType"/>
-
-    <!-- Must have class / interface header comments -->
-    <module name="JavadocType"/>
-        
-     <!-- Require method javadocs, allow undeclared RTE -->
-    <module name="JavadocMethod">
-    </module>
-        
-    <!-- Require field javadoc -->
-    <module name="JavadocVariable">
-      <property name="scope" value="protected"/>
-    </module>
-        
-    <!-- No public fields -->
-    <module name="VisibilityModifier">
-       <property name="packageAllowed" value="true"/>
-       <property name="protectedAllowed" value="true"/>
-    </module>
-    
-    <!-- Require hash code override when equals is -->
-    <module name="EqualsHashCode"/>
-    
-    <!-- Disallow unnecessary instantiation of Boolean, String -->
-    <module name="IllegalInstantiation">
-      <property name="classes" value="java.lang.Boolean, java.lang.String"/>
-    </module>
-
-  </module>
-  
-  <!-- Require package Javadoc -->
-  <module name="JavadocPackage">
-    <!-- setting allowLegacy means it will check for package.html instead of just package-info.java -->
-    <property name="allowLegacy" value="true"/>
-  </module>
-
-  <module name="LineLength">
-    <property name="max" value="160"/>
-  </module>
-
-</module>
+<?xml version="1.0"?>
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+-->
+<!DOCTYPE module PUBLIC
+    "-//Checkstyle//DTD Checkstyle Configuration 1.2//EN"
+    "https://checkstyle.org/dtds/configuration_1_2.dtd">
+
+<!--
+  Checkstyle checks configured for Maven.
+-->
+
+<module name="Checker">
+
+  <property name="localeLanguage" value="en"/>
+
+  <!-- No tabs allowed! -->
+  <module name="FileTabCharacter"/>
+    
+  <module name="TreeWalker">
+   
+    <!-- Operator must be at end of wrapped line -->
+    <module name="OperatorWrap">
+      <property name="option" value="eol"/>
+    </module>
+    
+    <!-- Interfaces must be types (not just constants) -->
+    <module name="InterfaceIsType"/>
+
+    <!-- Must have class / interface header comments -->
+    <module name="JavadocType"/>
+        
+     <!-- Require method javadocs, allow undeclared RTE -->
+    <module name="JavadocMethod">
+    </module>
+        
+    <!-- Require field javadoc -->
+    <module name="JavadocVariable">
+      <property name="scope" value="protected"/>
+    </module>
+        
+    <!-- No public fields -->
+    <module name="VisibilityModifier">
+       <property name="packageAllowed" value="true"/>
+       <property name="protectedAllowed" value="true"/>
+    </module>
+    
+    <!-- Require hash code override when equals is -->
+    <module name="EqualsHashCode"/>
+    
+    <!-- Disallow unnecessary instantiation of Boolean, String -->
+    <module name="IllegalInstantiation">
+      <property name="classes" value="java.lang.Boolean, java.lang.String"/>
+    </module>
+
+  </module>
+  
+  <!-- Require package Javadoc -->
+  <module name="JavadocPackage">
+    <!-- setting allowLegacy means it will check for package.html instead of just package-info.java -->
+    <property name="allowLegacy" value="true"/>
+  </module>
+
+  <module name="LineLength">
+    <property name="max" value="160"/>
+  </module>
+
+</module>
diff --git a/findbugs-exclude-filter.xml b/src/conf/findbugs-exclude-filter.xml
similarity index 97%
rename from findbugs-exclude-filter.xml
rename to src/conf/findbugs-exclude-filter.xml
index fd293b8b..c4e8cc4b 100644
--- a/findbugs-exclude-filter.xml
+++ b/src/conf/findbugs-exclude-filter.xml
@@ -1,205 +1,205 @@
-<?xml version="1.0"?>
-<!--
-   Licensed to the Apache Software Foundation (ASF) under one or more
-   contributor license agreements.  See the NOTICE file distributed with
-   this work for additional information regarding copyright ownership.
-   The ASF licenses this file to You 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.
--->
-
-<!--
-  This file contains some false positive bugs detected by Find Bugs. Their
-  false positive nature has been analyzed individually and they have been
-  put here to instruct Find Bugs to ignore them.
--->
-<FindBugsFilter>
-  <Match>
-    <!-- Class implements the generics based interface and does so correctly -->
-    <Class name="org.apache.commons.pool2.PooledObject" />
-    <Bug pattern="CO_ABSTRACT_SELF" />
-  </Match>
-  <Match>
-    <!-- Swallowing exception is deliberate design choice -->
-    <Or>
-      <Class name="org.apache.commons.pool2.PoolUtils$ErodingObjectPool" />
-      <Class name="org.apache.commons.pool2.PoolUtils$ErodingKeyedObjectPool" />
-    </Or>
-    <Or>
-      <Method name="invalidateObject" />
-      <Method name="close" />
-    </Or>
-    <Bug code="DE" />
-  </Match>
-  <Match>
-    <!-- Exception is thrown and need to be caught -->
-    <Class name="org.apache.commons.pool2.PoolUtils$KeyedObjectPoolMinIdleTimerTask" />
-    <Method name="run" />
-    <Bug code="REC" />
-  </Match>
-  <Match>
-    <!-- compareTo() method carries the appropriate warning -->
-    <Class name="org.apache.commons.pool2.impl.DefaultPooledObject" />
-    <Bug pattern="EQ_COMPARETO_USE_OBJECT_EQUALS " />
-  </Match>
-  <Match>
-    <!-- Update is inside sync block. Volatile is to ensure other threads    -->
-    <!-- can read new value.                                                 -->
-    <Class name="org.apache.commons.pool2.impl.DefaultPooledObject" />
-    <Method name="allocate" />
-    <Bug pattern="VO_VOLATILE_INCREMENT" />
-  </Match>
-  <Match>
-    <!-- Ignoring the exception is deliberate since an earlier exception is  -->
-    <!-- more important.                                                     -->
-    <Class name="org.apache.commons.pool2.impl.GenericKeyedObjectPool" />
-    <Method name="borrowObject" />
-    <Bug code="DE" />
-  </Match>
-  <Match>
-    <!-- Ignoring the exception is deliberate since an earlier exception is  -->
-    <!-- more important.                                                     -->
-    <Class name="org.apache.commons.pool2.impl.GenericObjectPool" />
-    <Method name="borrowObject" />
-    <Bug code="DE" />
-  </Match>
-  <Match>
-    <!-- TODO, Is this a real issue? -->
-    <Class name="org.apache.commons.pool2.impl.SoftReferenceObjectPool" />
-    <Or>
-      <Field name="createCount" />
-      <Field name="numActive" />
-    </Or>
-    <Bug pattern="IS2_INCONSISTENT_SYNC" />
-  </Match>
-  
-  <!-- TEST CODE -->
-  <Match>
-    <!-- Generating a new object is a deliberate choice -->
-    <Or>
-      <Class name="org.apache.commons.pool2.MethodCallPoolableObjectFactory" />
-      <Class name="org.apache.commons.pool2.TestKeyedObjectPool$FailingKeyedPooledObjectFactory" />
-      <Class name="org.apache.commons.pool2.performance.SleepingObjectFactory" />
-    </Or>
-    <Method name="makeObject" />
-    <Bug pattern="DM_NUMBER_CTOR" />
-  </Match>
-  <Match>
-    <!-- Generating a new object is a deliberate choice -->
-    <Or>
-      <Class name="org.apache.commons.pool2.TestKeyedObjectPool" />
-      <Class name="org.apache.commons.pool2.TestObjectPool" />
-    </Or>
-    <Bug pattern="DM_NUMBER_CTOR" />
-  </Match>
-  <Match>
-    <!-- Use of no-arg constructor is intentional -->
-    <Class name="org.apache.commons.pool2.TestPoolUtils" />
-    <Method name="testJavaBeanInstantiation" />
-    <Bug pattern="ISC_INSTANTIATE_STATIC_CLASS" />
-  </Match>
-  <Match>
-    <!-- Exceptions are deliberately ignored -->
-    <Or>
-      <Class name="org.apache.commons.pool2.impl.TestAbandonedObjectPool$ConcurrentBorrower" />
-      <Class name="org.apache.commons.pool2.impl.TestAbandonedObjectPool$ConcurrentReturner" />
-      <Class name="org.apache.commons.pool2.impl.TestGenericKeyedObjectPool$SimpleTestThread" />
-      <Class name="org.apache.commons.pool2.impl.TestGenericObjectPool$EvictionThread" />
-    </Or>
-    <Method name="run" />
-    <Bug pattern="DE_MIGHT_IGNORE" />
-  </Match>
-  <Match>
-    <!-- Using equals is deliberate. The objects are being tested to see if  -->
-    <!-- they are the same object                                            -->
-    <Class name="org.apache.commons.pool2.impl.TestGenericKeyedObjectPool" />
-    <Method name="testMaxTotalLRU" />
-    <Bug pattern="ES_COMPARING_STRINGS_WITH_EQ" />
-  </Match>
-  <Match>
-    <!-- Exception is ignored as earlier exception is more important -->
-    <Class name="org.apache.commons.pool2.impl.TestGenericObjectPool" />
-    <Method name="testMaxTotalUnderLoad" />
-    <Bug pattern="DE_MIGHT_IGNORE" />
-  </Match>
-  <Match>
-    <!-- Direct use of GC is deliberate and necessary -->
-    <Class name="org.apache.commons.pool2.impl.TestSoftRefOutOfMemory" />
-    <Mehtod name="tearDown" />
-    <Bug pattern="DM_GC" />
-  </Match>
-  <Match>
-    <!-- Use of new String() is deliberate -->
-    <Class name="org.apache.commons.pool2.impl.TestSoftRefOutOfMemory$OomeFactory" />
-    <Method name="create" />
-    <Bug pattern="DM_STRING_VOID_CTOR" />
-  </Match>
-  <Match>
-    <!-- Use of new String() is deliberate -->
-    <Class name="org.apache.commons.pool2.impl.TestSoftRefOutOfMemory$SmallPoolableObjectFactory" />
-    <Method name="create" />
-    <Bug pattern="DM_STRING_CTOR" />
-  </Match>
-  <Match>
-    <!-- Increment (only write) is in synchronized method, unprotected read in getter is OK -->
-    <Class name="org.apache.commons.pool2.impl.DefaultPooledObject" />
-    <Method name="allocate" />
-    <Bug pattern="VO_VOLATILE_INCREMENT" />
-  </Match>
-  <Match>
-    <!-- Only used internally in hashmap to compare keys known to be of the same type -->
-    <Class name="org.apache.commons.pool2.impl.BaseGenericObjectPool$IdentityWrapper" />
-    <Method name="equals" />
-    <Bug pattern="BC_EQUALS_METHOD_SHOULD_WORK_FOR_ALL_OBJECTS" />
-  </Match>
-  <Match>
-    <!-- Only used internally in hashmap to compare keys that can't be null -->
-    <Class name="org.apache.commons.pool2.impl.BaseGenericObjectPool$IdentityWrapper" />
-    <Method name="equals" />
-    <Bug pattern="NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT" />
-  </Match>
-  <Match>
-    <!-- Code needs to use get to ensure latest queue is retrieved -->
-    <Class name="org.apache.commons.pool2.impl.GenericKeyedObjectPool" />
-    <Method name="clearOldest" />
-    <Bug pattern="WMI_WRONG_MAP_ITERATOR" />
-  </Match>
-  <Match>
-    <!-- Code needs to use get to ensure latest queue is retrieved -->
-    <Class name="org.apache.commons.pool2.impl.GenericKeyedObjectPool" />
-    <Method name="getNumWaitersByKey" />
-    <Bug pattern="WMI_WRONG_MAP_ITERATOR" />
-  </Match>
-  <Match>
-    <!-- Code needs to use get to ensure latest queue is retrieved -->
-    <Class name="org.apache.commons.pool2.impl.GenericKeyedObjectPool" />
-    <Method name="hasBorrowWaiters" />
-    <Bug pattern="WMI_WRONG_MAP_ITERATOR" />
-  </Match>
-  <Match>
-    <!-- Code needs to use get to ensure latest queue is retrieved -->
-    <Class name="org.apache.commons.pool2.impl.GenericKeyedObjectPool" />
-    <Method name="listAllObjects" />
-    <Bug pattern="WMI_WRONG_MAP_ITERATOR" />
-  </Match>
-  <Match>
-    <!-- Code needs to use get to ensure latest queue is retrieved -->
-    <Class name="org.apache.commons.pool2.impl.GenericKeyedObjectPool" />
-    <Method name="reuseCapacity" />
-    <Bug pattern="WMI_WRONG_MAP_ITERATOR" />
-  </Match>
-  <Match>
-    <Bug pattern="EI_EXPOSE_REP" />
-  </Match>
-  <Match>
-    <Bug pattern="EI_EXPOSE_REP2" />
-  </Match>
-</FindBugsFilter>
+<?xml version="1.0"?>
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You 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.
+-->
+
+<!--
+  This file contains some false positive bugs detected by Find Bugs. Their
+  false positive nature has been analyzed individually and they have been
+  put here to instruct Find Bugs to ignore them.
+-->
+<FindBugsFilter>
+  <Match>
+    <!-- Class implements the generics based interface and does so correctly -->
+    <Class name="org.apache.commons.pool2.PooledObject" />
+    <Bug pattern="CO_ABSTRACT_SELF" />
+  </Match>
+  <Match>
+    <!-- Swallowing exception is deliberate design choice -->
+    <Or>
+      <Class name="org.apache.commons.pool2.PoolUtils$ErodingObjectPool" />
+      <Class name="org.apache.commons.pool2.PoolUtils$ErodingKeyedObjectPool" />
+    </Or>
+    <Or>
+      <Method name="invalidateObject" />
+      <Method name="close" />
+    </Or>
+    <Bug code="DE" />
+  </Match>
+  <Match>
+    <!-- Exception is thrown and need to be caught -->
+    <Class name="org.apache.commons.pool2.PoolUtils$KeyedObjectPoolMinIdleTimerTask" />
+    <Method name="run" />
+    <Bug code="REC" />
+  </Match>
+  <Match>
+    <!-- compareTo() method carries the appropriate warning -->
+    <Class name="org.apache.commons.pool2.impl.DefaultPooledObject" />
+    <Bug pattern="EQ_COMPARETO_USE_OBJECT_EQUALS " />
+  </Match>
+  <Match>
+    <!-- Update is inside sync block. Volatile is to ensure other threads    -->
+    <!-- can read new value.                                                 -->
+    <Class name="org.apache.commons.pool2.impl.DefaultPooledObject" />
+    <Method name="allocate" />
+    <Bug pattern="VO_VOLATILE_INCREMENT" />
+  </Match>
+  <Match>
+    <!-- Ignoring the exception is deliberate since an earlier exception is  -->
+    <!-- more important.                                                     -->
+    <Class name="org.apache.commons.pool2.impl.GenericKeyedObjectPool" />
+    <Method name="borrowObject" />
+    <Bug code="DE" />
+  </Match>
+  <Match>
+    <!-- Ignoring the exception is deliberate since an earlier exception is  -->
+    <!-- more important.                                                     -->
+    <Class name="org.apache.commons.pool2.impl.GenericObjectPool" />
+    <Method name="borrowObject" />
+    <Bug code="DE" />
+  </Match>
+  <Match>
+    <!-- TODO, Is this a real issue? -->
+    <Class name="org.apache.commons.pool2.impl.SoftReferenceObjectPool" />
+    <Or>
+      <Field name="createCount" />
+      <Field name="numActive" />
+    </Or>
+    <Bug pattern="IS2_INCONSISTENT_SYNC" />
+  </Match>
+  
+  <!-- TEST CODE -->
+  <Match>
+    <!-- Generating a new object is a deliberate choice -->
+    <Or>
+      <Class name="org.apache.commons.pool2.MethodCallPoolableObjectFactory" />
+      <Class name="org.apache.commons.pool2.TestKeyedObjectPool$FailingKeyedPooledObjectFactory" />
+      <Class name="org.apache.commons.pool2.performance.SleepingObjectFactory" />
+    </Or>
+    <Method name="makeObject" />
+    <Bug pattern="DM_NUMBER_CTOR" />
+  </Match>
+  <Match>
+    <!-- Generating a new object is a deliberate choice -->
+    <Or>
+      <Class name="org.apache.commons.pool2.TestKeyedObjectPool" />
+      <Class name="org.apache.commons.pool2.TestObjectPool" />
+    </Or>
+    <Bug pattern="DM_NUMBER_CTOR" />
+  </Match>
+  <Match>
+    <!-- Use of no-arg constructor is intentional -->
+    <Class name="org.apache.commons.pool2.TestPoolUtils" />
+    <Method name="testJavaBeanInstantiation" />
+    <Bug pattern="ISC_INSTANTIATE_STATIC_CLASS" />
+  </Match>
+  <Match>
+    <!-- Exceptions are deliberately ignored -->
+    <Or>
+      <Class name="org.apache.commons.pool2.impl.TestAbandonedObjectPool$ConcurrentBorrower" />
+      <Class name="org.apache.commons.pool2.impl.TestAbandonedObjectPool$ConcurrentReturner" />
+      <Class name="org.apache.commons.pool2.impl.TestGenericKeyedObjectPool$SimpleTestThread" />
+      <Class name="org.apache.commons.pool2.impl.TestGenericObjectPool$EvictionThread" />
+    </Or>
+    <Method name="run" />
+    <Bug pattern="DE_MIGHT_IGNORE" />
+  </Match>
+  <Match>
+    <!-- Using equals is deliberate. The objects are being tested to see if  -->
+    <!-- they are the same object                                            -->
+    <Class name="org.apache.commons.pool2.impl.TestGenericKeyedObjectPool" />
+    <Method name="testMaxTotalLRU" />
+    <Bug pattern="ES_COMPARING_STRINGS_WITH_EQ" />
+  </Match>
+  <Match>
+    <!-- Exception is ignored as earlier exception is more important -->
+    <Class name="org.apache.commons.pool2.impl.TestGenericObjectPool" />
+    <Method name="testMaxTotalUnderLoad" />
+    <Bug pattern="DE_MIGHT_IGNORE" />
+  </Match>
+  <Match>
+    <!-- Direct use of GC is deliberate and necessary -->
+    <Class name="org.apache.commons.pool2.impl.TestSoftRefOutOfMemory" />
+    <Mehtod name="tearDown" />
+    <Bug pattern="DM_GC" />
+  </Match>
+  <Match>
+    <!-- Use of new String() is deliberate -->
+    <Class name="org.apache.commons.pool2.impl.TestSoftRefOutOfMemory$OomeFactory" />
+    <Method name="create" />
+    <Bug pattern="DM_STRING_VOID_CTOR" />
+  </Match>
+  <Match>
+    <!-- Use of new String() is deliberate -->
+    <Class name="org.apache.commons.pool2.impl.TestSoftRefOutOfMemory$SmallPoolableObjectFactory" />
+    <Method name="create" />
+    <Bug pattern="DM_STRING_CTOR" />
+  </Match>
+  <Match>
+    <!-- Increment (only write) is in synchronized method, unprotected read in getter is OK -->
+    <Class name="org.apache.commons.pool2.impl.DefaultPooledObject" />
+    <Method name="allocate" />
+    <Bug pattern="VO_VOLATILE_INCREMENT" />
+  </Match>
+  <Match>
+    <!-- Only used internally in hashmap to compare keys known to be of the same type -->
+    <Class name="org.apache.commons.pool2.impl.BaseGenericObjectPool$IdentityWrapper" />
+    <Method name="equals" />
+    <Bug pattern="BC_EQUALS_METHOD_SHOULD_WORK_FOR_ALL_OBJECTS" />
+  </Match>
+  <Match>
+    <!-- Only used internally in hashmap to compare keys that can't be null -->
+    <Class name="org.apache.commons.pool2.impl.BaseGenericObjectPool$IdentityWrapper" />
+    <Method name="equals" />
+    <Bug pattern="NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT" />
+  </Match>
+  <Match>
+    <!-- Code needs to use get to ensure latest queue is retrieved -->
+    <Class name="org.apache.commons.pool2.impl.GenericKeyedObjectPool" />
+    <Method name="clearOldest" />
+    <Bug pattern="WMI_WRONG_MAP_ITERATOR" />
+  </Match>
+  <Match>
+    <!-- Code needs to use get to ensure latest queue is retrieved -->
+    <Class name="org.apache.commons.pool2.impl.GenericKeyedObjectPool" />
+    <Method name="getNumWaitersByKey" />
+    <Bug pattern="WMI_WRONG_MAP_ITERATOR" />
+  </Match>
+  <Match>
+    <!-- Code needs to use get to ensure latest queue is retrieved -->
+    <Class name="org.apache.commons.pool2.impl.GenericKeyedObjectPool" />
+    <Method name="hasBorrowWaiters" />
+    <Bug pattern="WMI_WRONG_MAP_ITERATOR" />
+  </Match>
+  <Match>
+    <!-- Code needs to use get to ensure latest queue is retrieved -->
+    <Class name="org.apache.commons.pool2.impl.GenericKeyedObjectPool" />
+    <Method name="listAllObjects" />
+    <Bug pattern="WMI_WRONG_MAP_ITERATOR" />
+  </Match>
+  <Match>
+    <!-- Code needs to use get to ensure latest queue is retrieved -->
+    <Class name="org.apache.commons.pool2.impl.GenericKeyedObjectPool" />
+    <Method name="reuseCapacity" />
+    <Bug pattern="WMI_WRONG_MAP_ITERATOR" />
+  </Match>
+  <Match>
+    <Bug pattern="EI_EXPOSE_REP" />
+  </Match>
+  <Match>
+    <Bug pattern="EI_EXPOSE_REP2" />
+  </Match>
+</FindBugsFilter>


[commons-pool] 02/02: Add PMD CPD check to default Maven goal

Posted by gg...@apache.org.
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 25c8ba9d24456f87d45619eefb6ceed7e888a7c9
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sun Jul 3 07:05:29 2022 -0400

    Add PMD CPD check to default Maven goal
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index fb4358ef..17a64c7b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -210,7 +210,7 @@
   </properties> 
 
   <build>
-      <defaultGoal>clean verify apache-rat:check checkstyle:check japicmp:cmp javadoc:javadoc spotbugs:check pmd:check</defaultGoal>
+      <defaultGoal>clean verify apache-rat:check checkstyle:check japicmp:cmp javadoc:javadoc spotbugs:check pmd:check pmd:cpd-check</defaultGoal>
       <pluginManagement>
         <plugins>
           <plugin>