findbugsExcludeFile.xml 12 KB

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