findbugsExcludeFile.xml 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366
  1. <!--
  2. Licensed to the Apache Software Foundation (ASF) under one or more
  3. contributor license agreements. See the NOTICE file distributed with
  4. this work for additional information regarding copyright ownership.
  5. The ASF licenses this file to You under the Apache License, Version 2.0
  6. (the "License"); you may not use this file except in compliance with
  7. the License. You may obtain a copy of the License at
  8. http://www.apache.org/licenses/LICENSE-2.0
  9. Unless required by applicable law or agreed to in writing, software
  10. distributed under the License is distributed on an "AS IS" BASIS,
  11. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. See the License for the specific language governing permissions and
  13. limitations under the License.
  14. -->
  15. <FindBugsFilter>
  16. <Match>
  17. <Package name="org.apache.hadoop.security.proto" />
  18. </Match>
  19. <Match>
  20. <Package name="org.apache.hadoop.tools.proto" />
  21. </Match>
  22. <Match>
  23. <Bug pattern="EI_EXPOSE_REP" />
  24. </Match>
  25. <Match>
  26. <Bug pattern="EI_EXPOSE_REP2" />
  27. </Match>
  28. <Match>
  29. <Bug pattern="SE_COMPARATOR_SHOULD_BE_SERIALIZABLE" />
  30. </Match>
  31. <Match>
  32. <Class name="~.*_jsp" />
  33. <Bug pattern="DLS_DEAD_LOCAL_STORE" />
  34. </Match>
  35. <Match>
  36. <Field name="_jspx_dependants" />
  37. <Bug pattern="UWF_UNWRITTEN_FIELD" />
  38. </Match>
  39. <!--
  40. Inconsistent synchronization for Client.Connection.out is
  41. is intentional to make a connection to be closed instantly.
  42. -->
  43. <Match>
  44. <Class name="org.apache.hadoop.ipc.Client$Connection" />
  45. <Field name="out" />
  46. <Bug pattern="IS2_INCONSISTENT_SYNC" />
  47. </Match>
  48. <!--
  49. Further SaslException should be ignored during cleanup and
  50. original exception should be re-thrown.
  51. -->
  52. <Match>
  53. <Class name="org.apache.hadoop.security.SaslRpcClient" />
  54. <Bug pattern="DE_MIGHT_IGNORE" />
  55. </Match>
  56. <!--
  57. Ignore Cross Scripting Vulnerabilities
  58. -->
  59. <Match>
  60. <Package name="~org.apache.hadoop.mapred.*" />
  61. <Bug code="XSS" />
  62. </Match>
  63. <Match>
  64. <Class name="org.apache.hadoop.mapred.taskdetails_jsp" />
  65. <Bug code="HRS" />
  66. </Match>
  67. <!--
  68. Ignore warnings where child class has the same name as
  69. super class. Classes based on Old API shadow names from
  70. new API. Should go off after HADOOP-1.0
  71. -->
  72. <Match>
  73. <Class name="~org.apache.hadoop.mapred.*" />
  74. <Bug pattern="NM_SAME_SIMPLE_NAME_AS_SUPERCLASS" />
  75. </Match>
  76. <!--
  77. Ignore warnings for usage of System.exit. This is
  78. required and have been well thought out
  79. -->
  80. <Match>
  81. <Class name="org.apache.hadoop.mapred.Child$2" />
  82. <Method name="run" />
  83. <Bug pattern="DM_EXIT" />
  84. </Match>
  85. <Match>
  86. <Class name="org.apache.hadoop.mapred.JobTracker" />
  87. <Method name="addHostToNodeMapping" />
  88. <Bug pattern="DM_EXIT" />
  89. </Match>
  90. <Match>
  91. <Class name="org.apache.hadoop.mapred.Task" />
  92. <Or>
  93. <Method name="done" />
  94. <Method name="commit" />
  95. <Method name="statusUpdate" />
  96. </Or>
  97. <Bug pattern="DM_EXIT" />
  98. </Match>
  99. <Match>
  100. <Class name="org.apache.hadoop.mapred.Task$TaskReporter" />
  101. <Method name="run" />
  102. <Bug pattern="DM_EXIT" />
  103. </Match>
  104. <Match>
  105. <Class name="org.apache.hadoop.util.ProgramDriver" />
  106. <Method name="driver" />
  107. <Bug pattern="DM_EXIT" />
  108. </Match>
  109. <!--
  110. We need to cast objects between old and new api objects
  111. -->
  112. <Match>
  113. <Class name="org.apache.hadoop.mapred.OutputCommitter" />
  114. <Bug pattern="BC_UNCONFIRMED_CAST" />
  115. </Match>
  116. <!--
  117. We intentionally do the get name from the inner class
  118. -->
  119. <Match>
  120. <Class name="org.apache.hadoop.mapred.TaskTracker$MapEventsFetcherThread" />
  121. <Method name="run" />
  122. <Bug pattern="IA_AMBIGUOUS_INVOCATION_OF_INHERITED_OR_OUTER_METHOD" />
  123. </Match>
  124. <Match>
  125. <Class name="org.apache.hadoop.mapred.FileOutputCommitter" />
  126. <Bug pattern="NM_WRONG_PACKAGE_INTENTIONAL" />
  127. </Match>
  128. <!--
  129. Ignoring this warning as resolving this would need a non-trivial change in code
  130. -->
  131. <Match>
  132. <Class name="org.apache.hadoop.mapred.lib.aggregate.ValueAggregatorBaseDescriptor" />
  133. <Method name="configure" />
  134. <Field name="maxNumItems" />
  135. <Bug pattern="ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD" />
  136. </Match>
  137. <!--
  138. Comes from org.apache.jasper.runtime.ResourceInjector. Cannot do much.
  139. -->
  140. <Match>
  141. <Class name="org.apache.hadoop.mapred.jobqueue_005fdetails_jsp" />
  142. <Field name="_jspx_resourceInjector" />
  143. <Bug pattern="SE_BAD_FIELD" />
  144. </Match>
  145. <!--
  146. Storing textInputFormat and then passing it as a parameter. Safe to ignore.
  147. -->
  148. <Match>
  149. <Class name="org.apache.hadoop.mapred.lib.aggregate.ValueAggregatorJob" />
  150. <Method name="createValueAggregatorJob" />
  151. <Bug pattern="DLS_DEAD_STORE_OF_CLASS_LITERAL" />
  152. </Match>
  153. <!--
  154. Can remove this after the upgrade to findbugs1.3.8
  155. -->
  156. <Match>
  157. <Class name="org.apache.hadoop.mapred.lib.db.DBInputFormat" />
  158. <Method name="getSplits" />
  159. <Bug pattern="DLS_DEAD_LOCAL_STORE" />
  160. </Match>
  161. <!--
  162. This is a spurious warning. Just ignore
  163. -->
  164. <Match>
  165. <Class name="org.apache.hadoop.mapred.MapTask$MapOutputBuffer" />
  166. <Field name="kvindex" />
  167. <Bug pattern="IS2_INCONSISTENT_SYNC" />
  168. </Match>
  169. <!--
  170. core changes
  171. -->
  172. <Match>
  173. <Class name="~org.apache.hadoop.*" />
  174. <Bug code="MS" />
  175. </Match>
  176. <Match>
  177. <Class name="org.apache.hadoop.fs.FileSystem" />
  178. <Method name="checkPath" />
  179. <Bug pattern="ES_COMPARING_STRINGS_WITH_EQ" />
  180. </Match>
  181. <Match>
  182. <Class name="org.apache.hadoop.io.Closeable" />
  183. <Bug pattern="NM_SAME_SIMPLE_NAME_AS_INTERFACE" />
  184. </Match>
  185. <Match>
  186. <Class name="org.apache.hadoop.security.AccessControlException" />
  187. <Bug pattern="NM_SAME_SIMPLE_NAME_AS_SUPERCLASS" />
  188. </Match>
  189. <Match>
  190. <Class name="org.apache.hadoop.util.ProcfsBasedProcessTree" />
  191. <Bug pattern="DMI_HARDCODED_ABSOLUTE_FILENAME" />
  192. </Match>
  193. <!--
  194. Streaming, Examples
  195. -->
  196. <Match>
  197. <Class name="org.apache.hadoop.streaming.StreamUtil$TaskId" />
  198. <Bug pattern="URF_UNREAD_FIELD" />
  199. </Match>
  200. <Match>
  201. <Class name="org.apache.hadoop.examples.DBCountPageView" />
  202. <Method name="verify" />
  203. <Bug pattern="OBL_UNSATISFIED_OBLIGATION" />
  204. </Match>
  205. <Match>
  206. <Class name="org.apache.hadoop.examples.ContextFactory" />
  207. <Method name="setAttributes" />
  208. <Bug pattern="OBL_UNSATISFIED_OBLIGATION" />
  209. </Match>
  210. <!--
  211. TFile
  212. -->
  213. <Match>
  214. <Class name="org.apache.hadoop.io.file.tfile.Chunk$ChunkDecoder" />
  215. <Method name="close" />
  216. <Bug pattern="SR_NOT_CHECKED" />
  217. </Match>
  218. <!--
  219. The purpose of skip() is to drain remaining bytes of the chunk-encoded
  220. stream (one chunk at a time). The termination condition is checked by
  221. checkEOF().
  222. -->
  223. <Match>
  224. <Class name="org.apache.hadoop.io.file.tfile.Utils" />
  225. <Method name="writeVLong" />
  226. <Bug pattern="SF_SWITCH_FALLTHROUGH" />
  227. </Match>
  228. <!--
  229. The switch condition fall through is intentional and for performance
  230. purposes.
  231. -->
  232. <Match>
  233. <Class name="org.apache.hadoop.log.EventCounter"/>
  234. <!-- backward compatibility -->
  235. <Bug pattern="NM_SAME_SIMPLE_NAME_AS_SUPERCLASS"/>
  236. </Match>
  237. <Match>
  238. <Class name="org.apache.hadoop.metrics.jvm.EventCounter"/>
  239. <!-- backward compatibility -->
  240. <Bug pattern="NM_SAME_SIMPLE_NAME_AS_SUPERCLASS"/>
  241. </Match>
  242. <Match>
  243. <!-- protobuf generated code -->
  244. <Class name="~org\.apache\.hadoop\.ipc\.protobuf\.ProtobufRpcEngineProtos.*"/>
  245. </Match>
  246. <Match>
  247. <!-- protobuf generated code -->
  248. <Class name="~org\.apache\.hadoop\.ipc\.protobuf\.ProtocolInfoProtos.*"/>
  249. </Match>
  250. <Match>
  251. <!-- protobuf generated code -->
  252. <Class name="~org\.apache\.hadoop\.ipc\.protobuf\.IpcConnectionContextProtos.*"/>
  253. </Match>
  254. <Match>
  255. <!-- protobuf generated code -->
  256. <Class name="~org\.apache\.hadoop\.ipc\.protobuf\.RpcHeaderProtos.*"/>
  257. </Match>
  258. <Match>
  259. <!-- protobuf generated code -->
  260. <Class name="~org\.apache\.hadoop\.ha\.proto\.HAServiceProtocolProtos.*"/>
  261. </Match>
  262. <Match>
  263. <!-- protobuf generated code -->
  264. <Class name="~org\.apache\.hadoop\.ha\.proto\.ZKFCProtocolProtos.*"/>
  265. </Match>
  266. <Match>
  267. <!-- protobuf generated code -->
  268. <Class name="~org\.apache\.hadoop\.security\.proto\.SecurityProtos.*"/>
  269. </Match>
  270. <Match>
  271. <!-- protobuf generated code -->
  272. <Class name="~org\.apache\.hadoop\.ipc\.protobuf\.TestProtos.*"/>
  273. </Match>
  274. <Match>
  275. <!-- protobuf generated code -->
  276. <Class name="~org\.apache\.hadoop\.ipc\.proto\.RefreshCallQueueProtocolProtos.*"/>
  277. </Match>
  278. <!--
  279. Manually checked, misses child thread manually syncing on parent's intrinsic lock.
  280. -->
  281. <Match>
  282. <Class name="org.apache.hadoop.metrics2.lib.MutableQuantiles" />
  283. <Field name="previousSnapshot" />
  284. <Bug pattern="IS2_INCONSISTENT_SYNC" />
  285. </Match>
  286. <!--
  287. The method uses a generic type T that extends two other types
  288. T1 and T2. Findbugs complains of a cast from T1 to T2.
  289. -->
  290. <Match>
  291. <Class name="org.apache.hadoop.fs.DelegationTokenRenewer" />
  292. <Method name="removeRenewAction" />
  293. <Bug pattern="BC_UNCONFIRMED_CAST" />
  294. </Match>
  295. <!-- Inconsistent synchronization flagged by findbugs is not valid. -->
  296. <Match>
  297. <Class name="org.apache.hadoop.ipc.Client$Connection" />
  298. <Field name="in" />
  299. <Bug pattern="IS2_INCONSISTENT_SYNC" />
  300. </Match>
  301. <!--
  302. The switch condition for INITIATE is expected to fallthru to RESPONSE
  303. to process initial sasl response token included in the INITIATE
  304. -->
  305. <Match>
  306. <Class name="org.apache.hadoop.ipc.Server$Connection" />
  307. <Method name="processSaslMessage" />
  308. <Bug pattern="SF_SWITCH_FALLTHROUGH" />
  309. </Match>
  310. <!-- Synchronization performed on util.concurrent instance. -->
  311. <Match>
  312. <Class name="org.apache.hadoop.service.AbstractService" />
  313. <Method name="stop" />
  314. <Bug code="JLM" />
  315. </Match>
  316. <Match>
  317. <Class name="org.apache.hadoop.service.AbstractService" />
  318. <Method name="waitForServiceToStop" />
  319. <Bug code="JLM" />
  320. </Match>
  321. <!--
  322. OpenStack Swift FS module -closes streams in a different method
  323. from where they are opened.
  324. -->
  325. <Match>
  326. <Class name="org.apache.hadoop.fs.swift.snative.SwiftNativeOutputStream"/>
  327. <Method name="uploadFileAttempt"/>
  328. <Bug pattern="OBL_UNSATISFIED_OBLIGATION"/>
  329. </Match>
  330. <Match>
  331. <Class name="org.apache.hadoop.fs.swift.snative.SwiftNativeOutputStream"/>
  332. <Method name="uploadFilePartAttempt"/>
  333. <Bug pattern="OBL_UNSATISFIED_OBLIGATION"/>
  334. </Match>
  335. <!-- code from maven source, null value is checked at callee side. -->
  336. <Match>
  337. <Class name="org.apache.hadoop.util.ComparableVersion$ListItem" />
  338. <Method name="compareTo" />
  339. <Bug code="NP" />
  340. </Match>
  341. <Match>
  342. <Class name="org.apache.hadoop.crypto.key.kms.KMSClientProvider"/>
  343. <Method name="validateResponse"/>
  344. <Bug pattern="REC_CATCH_EXCEPTION"/>
  345. </Match>
  346. </FindBugsFilter>