forked from apache/commons-pool
-
Notifications
You must be signed in to change notification settings - Fork 0
/
findbugs-exclude-filter.xml
206 lines (202 loc) · 8.19 KB
/
findbugs-exclude-filter.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
<?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="<init>" />
<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>
<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>
</FindBugsFilter>