findbugsExcludeFile.xml 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413
  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. <Match>
  113. <Class name="org.apache.hadoop.util.RunJar" />
  114. <Method name="run" />
  115. <Bug pattern="DM_EXIT" />
  116. </Match>
  117. <!--
  118. We need to cast objects between old and new api objects
  119. -->
  120. <Match>
  121. <Class name="org.apache.hadoop.mapred.OutputCommitter" />
  122. <Bug pattern="BC_UNCONFIRMED_CAST" />
  123. </Match>
  124. <!--
  125. We intentionally do the get name from the inner class
  126. -->
  127. <Match>
  128. <Class name="org.apache.hadoop.mapred.TaskTracker$MapEventsFetcherThread" />
  129. <Method name="run" />
  130. <Bug pattern="IA_AMBIGUOUS_INVOCATION_OF_INHERITED_OR_OUTER_METHOD" />
  131. </Match>
  132. <Match>
  133. <Class name="org.apache.hadoop.mapred.FileOutputCommitter" />
  134. <Bug pattern="NM_WRONG_PACKAGE_INTENTIONAL" />
  135. </Match>
  136. <!--
  137. Ignoring this warning as resolving this would need a non-trivial change in code
  138. -->
  139. <Match>
  140. <Class name="org.apache.hadoop.mapred.lib.aggregate.ValueAggregatorBaseDescriptor" />
  141. <Method name="configure" />
  142. <Field name="maxNumItems" />
  143. <Bug pattern="ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD" />
  144. </Match>
  145. <!--
  146. Comes from org.apache.jasper.runtime.ResourceInjector. Cannot do much.
  147. -->
  148. <Match>
  149. <Class name="org.apache.hadoop.mapred.jobqueue_005fdetails_jsp" />
  150. <Field name="_jspx_resourceInjector" />
  151. <Bug pattern="SE_BAD_FIELD" />
  152. </Match>
  153. <!--
  154. Storing textInputFormat and then passing it as a parameter. Safe to ignore.
  155. -->
  156. <Match>
  157. <Class name="org.apache.hadoop.mapred.lib.aggregate.ValueAggregatorJob" />
  158. <Method name="createValueAggregatorJob" />
  159. <Bug pattern="DLS_DEAD_STORE_OF_CLASS_LITERAL" />
  160. </Match>
  161. <!--
  162. Can remove this after the upgrade to findbugs1.3.8
  163. -->
  164. <Match>
  165. <Class name="org.apache.hadoop.mapred.lib.db.DBInputFormat" />
  166. <Method name="getSplits" />
  167. <Bug pattern="DLS_DEAD_LOCAL_STORE" />
  168. </Match>
  169. <!--
  170. This is a spurious warning. Just ignore
  171. -->
  172. <Match>
  173. <Class name="org.apache.hadoop.mapred.MapTask$MapOutputBuffer" />
  174. <Field name="kvindex" />
  175. <Bug pattern="IS2_INCONSISTENT_SYNC" />
  176. </Match>
  177. <!--
  178. core changes
  179. -->
  180. <Match>
  181. <Class name="~org.apache.hadoop.*" />
  182. <Bug code="MS" />
  183. </Match>
  184. <Match>
  185. <Class name="org.apache.hadoop.fs.FileSystem" />
  186. <Method name="checkPath" />
  187. <Bug pattern="ES_COMPARING_STRINGS_WITH_EQ" />
  188. </Match>
  189. <Match>
  190. <Class name="org.apache.hadoop.io.Closeable" />
  191. <Bug pattern="NM_SAME_SIMPLE_NAME_AS_INTERFACE" />
  192. </Match>
  193. <Match>
  194. <Class name="org.apache.hadoop.security.AccessControlException" />
  195. <Bug pattern="NM_SAME_SIMPLE_NAME_AS_SUPERCLASS" />
  196. </Match>
  197. <Match>
  198. <Class name="org.apache.hadoop.record.meta.Utils" />
  199. <Method name="skip" />
  200. <Bug pattern="BC_UNCONFIRMED_CAST" />
  201. </Match>
  202. <!--
  203. The compareTo method is actually a dummy method that just
  204. throws excpetions. So, no need to override equals. Ignore
  205. -->
  206. <Match>
  207. <Class name="org.apache.hadoop.record.meta.RecordTypeInfo" />
  208. <Bug pattern="EQ_COMPARETO_USE_OBJECT_EQUALS" />
  209. </Match>
  210. <Match>
  211. <Class name="org.apache.hadoop.util.ProcfsBasedProcessTree" />
  212. <Bug pattern="DMI_HARDCODED_ABSOLUTE_FILENAME" />
  213. </Match>
  214. <!--
  215. Streaming, Examples
  216. -->
  217. <Match>
  218. <Class name="org.apache.hadoop.streaming.StreamUtil$TaskId" />
  219. <Bug pattern="URF_UNREAD_FIELD" />
  220. </Match>
  221. <Match>
  222. <Class name="org.apache.hadoop.examples.DBCountPageView" />
  223. <Method name="verify" />
  224. <Bug pattern="OBL_UNSATISFIED_OBLIGATION" />
  225. </Match>
  226. <Match>
  227. <Class name="org.apache.hadoop.examples.ContextFactory" />
  228. <Method name="setAttributes" />
  229. <Bug pattern="OBL_UNSATISFIED_OBLIGATION" />
  230. </Match>
  231. <!--
  232. TFile
  233. -->
  234. <Match>
  235. <Class name="org.apache.hadoop.io.file.tfile.Chunk$ChunkDecoder" />
  236. <Method name="close" />
  237. <Bug pattern="SR_NOT_CHECKED" />
  238. </Match>
  239. <!--
  240. The purpose of skip() is to drain remaining bytes of the chunk-encoded
  241. stream (one chunk at a time). The termination condition is checked by
  242. checkEOF().
  243. -->
  244. <Match>
  245. <Class name="org.apache.hadoop.io.file.tfile.Utils" />
  246. <Method name="writeVLong" />
  247. <Bug pattern="SF_SWITCH_FALLTHROUGH" />
  248. </Match>
  249. <Match>
  250. <Class name="org.apache.hadoop.io.Text" />
  251. <Method name="bytesToCodePoint" />
  252. <Bug pattern="SF_SWITCH_NO_DEFAULT" />
  253. </Match>
  254. <Match>
  255. <Class name="org.apache.hadoop.util.PureJavaCrc32C" />
  256. <Method name="update" />
  257. <Bug pattern="SF_SWITCH_NO_DEFAULT" />
  258. </Match>
  259. <!--
  260. The switch condition fall through is intentional and for performance
  261. purposes.
  262. -->
  263. <Match>
  264. <Class name="org.apache.hadoop.log.EventCounter"/>
  265. <!-- backward compatibility -->
  266. <Bug pattern="NM_SAME_SIMPLE_NAME_AS_SUPERCLASS"/>
  267. </Match>
  268. <Match>
  269. <Class name="org.apache.hadoop.metrics.jvm.EventCounter"/>
  270. <!-- backward compatibility -->
  271. <Bug pattern="NM_SAME_SIMPLE_NAME_AS_SUPERCLASS"/>
  272. </Match>
  273. <Match>
  274. <!-- protobuf generated code -->
  275. <Class name="~org\.apache\.hadoop\.ipc\.protobuf\.ProtobufRpcEngineProtos.*"/>
  276. </Match>
  277. <Match>
  278. <!-- protobuf generated code -->
  279. <Class name="~org\.apache\.hadoop\.ipc\.protobuf\.ProtocolInfoProtos.*"/>
  280. </Match>
  281. <Match>
  282. <!-- protobuf generated code -->
  283. <Class name="~org\.apache\.hadoop\.ipc\.protobuf\.IpcConnectionContextProtos.*"/>
  284. </Match>
  285. <Match>
  286. <!-- protobuf generated code -->
  287. <Class name="~org\.apache\.hadoop\.ipc\.protobuf\.RpcHeaderProtos.*"/>
  288. </Match>
  289. <Match>
  290. <!-- protobuf generated code -->
  291. <Class name="~org\.apache\.hadoop\.ha\.proto\.HAServiceProtocolProtos.*"/>
  292. </Match>
  293. <Match>
  294. <!-- protobuf generated code -->
  295. <Class name="~org\.apache\.hadoop\.ha\.proto\.ZKFCProtocolProtos.*"/>
  296. </Match>
  297. <Match>
  298. <!-- protobuf generated code -->
  299. <Class name="~org\.apache\.hadoop\.security\.proto\.SecurityProtos.*"/>
  300. </Match>
  301. <Match>
  302. <!-- protobuf generated code -->
  303. <Class name="~org\.apache\.hadoop\.ipc\.protobuf\.TestProtos.*"/>
  304. </Match>
  305. <Match>
  306. <!-- protobuf generated code -->
  307. <Class name="~org\.apache\.hadoop\.ipc\.proto\.RefreshCallQueueProtocolProtos.*"/>
  308. </Match>
  309. <Match>
  310. <!-- protobuf generated code -->
  311. <Class name="~org\.apache\.hadoop\.ipc\.proto\.GenericRefreshProtocolProtos.*"/>
  312. </Match>
  313. <Match>
  314. <!-- protobuf generated code -->
  315. <Class name="~org\.apache\.hadoop\.tracing\.TraceAdminPB.*"/>
  316. </Match>
  317. <!--
  318. Manually checked, misses child thread manually syncing on parent's intrinsic lock.
  319. -->
  320. <Match>
  321. <Class name="org.apache.hadoop.metrics2.lib.MutableQuantiles" />
  322. <Field name="previousSnapshot" />
  323. <Bug pattern="IS2_INCONSISTENT_SYNC" />
  324. </Match>
  325. <!--
  326. The method uses a generic type T that extends two other types
  327. T1 and T2. Findbugs complains of a cast from T1 to T2.
  328. -->
  329. <Match>
  330. <Class name="org.apache.hadoop.fs.DelegationTokenRenewer" />
  331. <Method name="removeRenewAction" />
  332. <Bug pattern="BC_UNCONFIRMED_CAST" />
  333. </Match>
  334. <!-- Inconsistent synchronization flagged by findbugs is not valid. -->
  335. <Match>
  336. <Class name="org.apache.hadoop.ipc.Client$Connection" />
  337. <Field name="in" />
  338. <Bug pattern="IS2_INCONSISTENT_SYNC" />
  339. </Match>
  340. <!--
  341. The switch condition for INITIATE is expected to fallthru to RESPONSE
  342. to process initial sasl response token included in the INITIATE
  343. -->
  344. <Match>
  345. <Class name="org.apache.hadoop.ipc.Server$Connection" />
  346. <Method name="processSaslMessage" />
  347. <Bug pattern="SF_SWITCH_FALLTHROUGH" />
  348. </Match>
  349. <!-- Synchronization performed on util.concurrent instance. -->
  350. <Match>
  351. <Class name="org.apache.hadoop.service.AbstractService" />
  352. <Method name="stop" />
  353. <Bug code="JLM" />
  354. </Match>
  355. <Match>
  356. <Class name="org.apache.hadoop.service.AbstractService" />
  357. <Method name="waitForServiceToStop" />
  358. <Bug code="JLM" />
  359. </Match>
  360. <!--
  361. OpenStack Swift FS module -closes streams in a different method
  362. from where they are opened.
  363. -->
  364. <Match>
  365. <Class name="org.apache.hadoop.fs.swift.snative.SwiftNativeOutputStream"/>
  366. <Method name="uploadFileAttempt"/>
  367. <Bug pattern="OBL_UNSATISFIED_OBLIGATION"/>
  368. </Match>
  369. <Match>
  370. <Class name="org.apache.hadoop.fs.swift.snative.SwiftNativeOutputStream"/>
  371. <Method name="uploadFilePartAttempt"/>
  372. <Bug pattern="OBL_UNSATISFIED_OBLIGATION"/>
  373. </Match>
  374. <!-- code from maven source, null value is checked at callee side. -->
  375. <Match>
  376. <Class name="org.apache.hadoop.util.ComparableVersion$ListItem" />
  377. <Method name="compareTo" />
  378. <Bug code="NP" />
  379. </Match>
  380. <Match>
  381. <Class name="org.apache.hadoop.util.HttpExceptionUtils"/>
  382. <Method name="validateResponse"/>
  383. <Bug pattern="REC_CATCH_EXCEPTION"/>
  384. </Match>
  385. <Match>
  386. <Class name="org.apache.hadoop.conf.Configuration"/>
  387. <Method name="loadProperty"/>
  388. <Bug pattern="NP_NULL_PARAM_DEREF"/>
  389. </Match>
  390. </FindBugsFilter>