blob: 9dcfed26e4444519bd6179592c96db2c877ebf80 [file] [log] [blame]
<?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>
<!-- Use of default system encoding is deliberate design choice -->
<Class name="org.apache.commons.pool2.impl.AbandonedConfig" />
<Method name="&lt;init&gt;" />
<Bug pattern="DM_DEFAULT_ENCODING " />
</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>
<!-- Swallowing exception is deliberate design choice -->
<Class name="org.apache.commons.pool2.impl.SoftReferenceObjectPool" />
<Or>
<Method name="addObject" />
<Method name="clear" />
<Method name="returnObject" />
</Or>
<Bug code="DE" />
</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>
</FindBugsFilter>