findbugsExcludeFile.xml 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458
  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="ipcStreams" />
  46. <Bug pattern="IS2_INCONSISTENT_SYNC" />
  47. </Match>
  48. <!--
  49. The nativeCoder field is get/set and used by native codes.
  50. -->
  51. <Match>
  52. <Class name="org.apache.hadoop.io.erasurecode.rawcoder.AbstractNativeRawEncoder" />
  53. <Field name="nativeCoder" />
  54. <Bug pattern="UUF_UNUSED_FIELD" />
  55. </Match>
  56. <Match>
  57. <Class name="org.apache.hadoop.io.erasurecode.rawcoder.AbstractNativeRawDecoder" />
  58. <Field name="nativeCoder" />
  59. <Bug pattern="UUF_UNUSED_FIELD" />
  60. </Match>
  61. <!--
  62. Further SaslException should be ignored during cleanup and
  63. original exception should be re-thrown.
  64. -->
  65. <Match>
  66. <Class name="org.apache.hadoop.security.SaslRpcClient" />
  67. <Bug pattern="DE_MIGHT_IGNORE" />
  68. </Match>
  69. <!--
  70. Ignore Cross Scripting Vulnerabilities
  71. -->
  72. <Match>
  73. <Package name="~org.apache.hadoop.mapred.*" />
  74. <Bug code="XSS" />
  75. </Match>
  76. <Match>
  77. <Class name="org.apache.hadoop.mapred.taskdetails_jsp" />
  78. <Bug code="HRS" />
  79. </Match>
  80. <!--
  81. Ignore warnings where child class has the same name as
  82. super class. Classes based on Old API shadow names from
  83. new API. Should go off after HADOOP-1.0
  84. -->
  85. <Match>
  86. <Class name="~org.apache.hadoop.mapred.*" />
  87. <Bug pattern="NM_SAME_SIMPLE_NAME_AS_SUPERCLASS" />
  88. </Match>
  89. <!--
  90. Ignore warnings for usage of System.exit. This is
  91. required and have been well thought out
  92. -->
  93. <Match>
  94. <Class name="org.apache.hadoop.mapred.Child$2" />
  95. <Method name="run" />
  96. <Bug pattern="DM_EXIT" />
  97. </Match>
  98. <Match>
  99. <Class name="org.apache.hadoop.mapred.JobTracker" />
  100. <Method name="addHostToNodeMapping" />
  101. <Bug pattern="DM_EXIT" />
  102. </Match>
  103. <Match>
  104. <Class name="org.apache.hadoop.mapred.Task" />
  105. <Or>
  106. <Method name="done" />
  107. <Method name="commit" />
  108. <Method name="statusUpdate" />
  109. </Or>
  110. <Bug pattern="DM_EXIT" />
  111. </Match>
  112. <Match>
  113. <Class name="org.apache.hadoop.mapred.Task$TaskReporter" />
  114. <Method name="run" />
  115. <Bug pattern="DM_EXIT" />
  116. </Match>
  117. <Match>
  118. <Class name="org.apache.hadoop.util.ProgramDriver" />
  119. <Method name="driver" />
  120. <Bug pattern="DM_EXIT" />
  121. </Match>
  122. <Match>
  123. <Class name="org.apache.hadoop.util.RunJar" />
  124. <Method name="run" />
  125. <Bug pattern="DM_EXIT" />
  126. </Match>
  127. <!--
  128. We need to cast objects between old and new api objects
  129. -->
  130. <Match>
  131. <Class name="org.apache.hadoop.mapred.OutputCommitter" />
  132. <Bug pattern="BC_UNCONFIRMED_CAST" />
  133. </Match>
  134. <!--
  135. We intentionally do the get name from the inner class
  136. -->
  137. <Match>
  138. <Class name="org.apache.hadoop.mapred.TaskTracker$MapEventsFetcherThread" />
  139. <Method name="run" />
  140. <Bug pattern="IA_AMBIGUOUS_INVOCATION_OF_INHERITED_OR_OUTER_METHOD" />
  141. </Match>
  142. <Match>
  143. <Class name="org.apache.hadoop.mapred.FileOutputCommitter" />
  144. <Bug pattern="NM_WRONG_PACKAGE_INTENTIONAL" />
  145. </Match>
  146. <!--
  147. Ignoring this warning as resolving this would need a non-trivial change in code
  148. -->
  149. <Match>
  150. <Class name="org.apache.hadoop.mapred.lib.aggregate.ValueAggregatorBaseDescriptor" />
  151. <Method name="configure" />
  152. <Field name="maxNumItems" />
  153. <Bug pattern="ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD" />
  154. </Match>
  155. <!--
  156. Comes from org.apache.jasper.runtime.ResourceInjector. Cannot do much.
  157. -->
  158. <Match>
  159. <Class name="org.apache.hadoop.mapred.jobqueue_005fdetails_jsp" />
  160. <Field name="_jspx_resourceInjector" />
  161. <Bug pattern="SE_BAD_FIELD" />
  162. </Match>
  163. <!--
  164. Storing textInputFormat and then passing it as a parameter. Safe to ignore.
  165. -->
  166. <Match>
  167. <Class name="org.apache.hadoop.mapred.lib.aggregate.ValueAggregatorJob" />
  168. <Method name="createValueAggregatorJob" />
  169. <Bug pattern="DLS_DEAD_STORE_OF_CLASS_LITERAL" />
  170. </Match>
  171. <!--
  172. Can remove this after the upgrade to findbugs1.3.8
  173. -->
  174. <Match>
  175. <Class name="org.apache.hadoop.mapred.lib.db.DBInputFormat" />
  176. <Method name="getSplits" />
  177. <Bug pattern="DLS_DEAD_LOCAL_STORE" />
  178. </Match>
  179. <!--
  180. This is a spurious warning. Just ignore
  181. -->
  182. <Match>
  183. <Class name="org.apache.hadoop.mapred.MapTask$MapOutputBuffer" />
  184. <Field name="kvindex" />
  185. <Bug pattern="IS2_INCONSISTENT_SYNC" />
  186. </Match>
  187. <!--
  188. core changes
  189. -->
  190. <Match>
  191. <Class name="~org.apache.hadoop.*" />
  192. <Bug code="MS" />
  193. </Match>
  194. <Match>
  195. <Class name="org.apache.hadoop.fs.FileSystem" />
  196. <Method name="checkPath" />
  197. <Bug pattern="ES_COMPARING_STRINGS_WITH_EQ" />
  198. </Match>
  199. <Match>
  200. <Class name="org.apache.hadoop.io.Closeable" />
  201. <Bug pattern="NM_SAME_SIMPLE_NAME_AS_INTERFACE" />
  202. </Match>
  203. <Match>
  204. <Class name="org.apache.hadoop.security.AccessControlException" />
  205. <Bug pattern="NM_SAME_SIMPLE_NAME_AS_SUPERCLASS" />
  206. </Match>
  207. <Match>
  208. <Class name="org.apache.hadoop.util.ProcfsBasedProcessTree" />
  209. <Bug pattern="DMI_HARDCODED_ABSOLUTE_FILENAME" />
  210. </Match>
  211. <!--
  212. Streaming, Examples
  213. -->
  214. <Match>
  215. <Class name="org.apache.hadoop.streaming.StreamUtil$TaskId" />
  216. <Bug pattern="URF_UNREAD_FIELD" />
  217. </Match>
  218. <Match>
  219. <Class name="org.apache.hadoop.examples.DBCountPageView" />
  220. <Method name="verify" />
  221. <Bug pattern="OBL_UNSATISFIED_OBLIGATION" />
  222. </Match>
  223. <Match>
  224. <Class name="org.apache.hadoop.examples.ContextFactory" />
  225. <Method name="setAttributes" />
  226. <Bug pattern="OBL_UNSATISFIED_OBLIGATION" />
  227. </Match>
  228. <!--
  229. TFile
  230. -->
  231. <Match>
  232. <Class name="org.apache.hadoop.io.file.tfile.Chunk$ChunkDecoder" />
  233. <Method name="close" />
  234. <Bug pattern="SR_NOT_CHECKED" />
  235. </Match>
  236. <!--
  237. The purpose of skip() is to drain remaining bytes of the chunk-encoded
  238. stream (one chunk at a time). The termination condition is checked by
  239. checkEOF().
  240. -->
  241. <Match>
  242. <Class name="org.apache.hadoop.io.file.tfile.Utils" />
  243. <Method name="writeVLong" />
  244. <Bug pattern="SF_SWITCH_FALLTHROUGH" />
  245. </Match>
  246. <Match>
  247. <Class name="org.apache.hadoop.io.Text" />
  248. <Method name="bytesToCodePoint" />
  249. <Bug pattern="SF_SWITCH_NO_DEFAULT" />
  250. </Match>
  251. <Match>
  252. <Class name="org.apache.hadoop.util.PureJavaCrc32C" />
  253. <Method name="update" />
  254. <Bug pattern="SF_SWITCH_NO_DEFAULT" />
  255. </Match>
  256. <!--
  257. The switch condition fall through is intentional and for performance
  258. purposes.
  259. -->
  260. <Match>
  261. <Class name="org.apache.hadoop.log.EventCounter"/>
  262. <!-- backward compatibility -->
  263. <Bug pattern="NM_SAME_SIMPLE_NAME_AS_SUPERCLASS"/>
  264. </Match>
  265. <Match>
  266. <Class name="org.apache.hadoop.metrics.jvm.EventCounter"/>
  267. <!-- backward compatibility -->
  268. <Bug pattern="NM_SAME_SIMPLE_NAME_AS_SUPERCLASS"/>
  269. </Match>
  270. <Match>
  271. <!-- protobuf generated code -->
  272. <Class name="~org\.apache\.hadoop\.ipc\.protobuf\.ProtobufRpcEngineProtos.*"/>
  273. </Match>
  274. <Match>
  275. <!-- protobuf generated code -->
  276. <Class name="~org\.apache\.hadoop\.ipc\.protobuf\.ProtobufRpcEngine2Protos.*"/>
  277. </Match>
  278. <Match>
  279. <!-- protobuf generated code -->
  280. <Class name="~org\.apache\.hadoop\.ipc\.protobuf\.ProtocolInfoProtos.*"/>
  281. </Match>
  282. <Match>
  283. <!-- protobuf generated code -->
  284. <Class name="~org\.apache\.hadoop\.ipc\.protobuf\.IpcConnectionContextProtos.*"/>
  285. </Match>
  286. <Match>
  287. <!-- protobuf generated code -->
  288. <Class name="~org\.apache\.hadoop\.ipc\.protobuf\.RpcHeaderProtos.*"/>
  289. </Match>
  290. <Match>
  291. <!-- protobuf generated code -->
  292. <Class name="~org\.apache\.hadoop\.ha\.proto\.HAServiceProtocolProtos.*"/>
  293. </Match>
  294. <Match>
  295. <!-- protobuf generated code -->
  296. <Class name="~org\.apache\.hadoop\.ha\.proto\.ZKFCProtocolProtos.*"/>
  297. </Match>
  298. <Match>
  299. <!-- protobuf generated code -->
  300. <Class name="~org\.apache\.hadoop\.security\.proto\.SecurityProtos.*"/>
  301. </Match>
  302. <Match>
  303. <!-- protobuf generated code -->
  304. <Class name="~org\.apache\.hadoop\.ipc\.protobuf\.TestProtos.*"/>
  305. </Match>
  306. <Match>
  307. <!-- protobuf generated code -->
  308. <Class name="~org\.apache\.hadoop\.ipc\.proto\.RefreshCallQueueProtocolProtos.*"/>
  309. </Match>
  310. <Match>
  311. <!-- protobuf generated code -->
  312. <Class name="~org\.apache\.hadoop\.ipc\.proto\.GenericRefreshProtocolProtos.*"/>
  313. </Match>
  314. <Match>
  315. <!-- protobuf generated code -->
  316. <Class name="~org\.apache\.hadoop\.tracing\.TraceAdminPB.*"/>
  317. </Match>
  318. <Match>
  319. <!-- protobuf generated code -->
  320. <Class name="~org\.apache\.hadoop\.fs\.FSProto.*"/>
  321. </Match>
  322. <!--
  323. Manually checked, misses child thread manually syncing on parent's intrinsic lock.
  324. -->
  325. <Match>
  326. <Class name="org.apache.hadoop.metrics2.lib.MutableQuantiles" />
  327. <Field name="previousSnapshot" />
  328. <Bug pattern="IS2_INCONSISTENT_SYNC" />
  329. </Match>
  330. <!--
  331. The method uses a generic type T that extends two other types
  332. T1 and T2. Findbugs complains of a cast from T1 to T2.
  333. -->
  334. <Match>
  335. <Class name="org.apache.hadoop.fs.DelegationTokenRenewer" />
  336. <Method name="removeRenewAction" />
  337. <Bug pattern="BC_UNCONFIRMED_CAST" />
  338. </Match>
  339. <!--
  340. The switch condition for INITIATE is expected to fallthru to RESPONSE
  341. to process initial sasl response token included in the INITIATE
  342. -->
  343. <Match>
  344. <Class name="org.apache.hadoop.ipc.Server$Connection" />
  345. <Method name="processSaslMessage" />
  346. <Bug pattern="SF_SWITCH_FALLTHROUGH" />
  347. </Match>
  348. <!-- WA_NOT_IN_LOOP is invalid in util.concurrent.AsyncGet$Util.wait. -->
  349. <Match>
  350. <Class name="org.apache.hadoop.util.concurrent.AsyncGet$Util" />
  351. <Method name="wait" />
  352. <Bug pattern="WA_NOT_IN_LOOP" />
  353. </Match>
  354. <Match>
  355. <Class name="org.apache.hadoop.service.AbstractService" />
  356. <Method name="stop" />
  357. <Bug code="JLM" />
  358. </Match>
  359. <Match>
  360. <Class name="org.apache.hadoop.service.AbstractService" />
  361. <Method name="waitForServiceToStop" />
  362. <Bug code="JLM" />
  363. </Match>
  364. <!-- code from maven source, null value is checked at callee side. -->
  365. <Match>
  366. <Class name="org.apache.hadoop.util.ComparableVersion$ListItem" />
  367. <Method name="compareTo" />
  368. <Bug code="NP" />
  369. </Match>
  370. <Match>
  371. <Class name="org.apache.hadoop.util.HttpExceptionUtils"/>
  372. <Method name="validateResponse"/>
  373. <Bug pattern="REC_CATCH_EXCEPTION"/>
  374. </Match>
  375. <Match>
  376. <Class name="org.apache.hadoop.conf.Configuration"/>
  377. <Method name="loadProperty"/>
  378. <Bug pattern="NP_NULL_PARAM_DEREF"/>
  379. </Match>
  380. <!-- Parameter is checked with Strings.isNullOrEmpty before accessing -->
  381. <Match>
  382. <Class name="org.apache.hadoop.conf.Configuration"/>
  383. <Method name="asXmlDocument"/>
  384. <Bug pattern="NP_PARAMETER_MUST_BE_NONNULL_BUT_MARKED_AS_NULLABLE"/>
  385. </Match>
  386. <Match>
  387. <Class name="org.apache.hadoop.ipc.ExternalCall"/>
  388. <Filed name="done"/>
  389. <Bug pattern="JLM_JSR166_UTILCONCURRENT_MONITORENTER"/>
  390. </Match>
  391. <Match>
  392. <Class name="org.apache.hadoop.metrics2.impl.MetricsConfig"/>
  393. <Method name="toString"/>
  394. <Bug pattern="DM_DEFAULT_ENCODING"/>
  395. </Match>
  396. <!-- We need to make the methods public because PBHelperClient calls them. -->
  397. <Match>
  398. <Class name="org.apache.hadoop.crypto.CipherSuite"/>
  399. <Method name="setUnknownValue"/>
  400. <Bug pattern="ME_ENUM_FIELD_SETTER"/>
  401. </Match>
  402. <Match>
  403. <Class name="org.apache.hadoop.crypto.CryptoProtocolVersion"/>
  404. <Method name="setUnknownValue"/>
  405. <Bug pattern="ME_ENUM_FIELD_SETTER"/>
  406. </Match>
  407. <!-- We need to make the method public for testing. -->
  408. <Match>
  409. <Class name="org.apache.hadoop.metrics2.lib.DefaultMetricsSystem"/>
  410. <Method name="setMiniClusterMode"/>
  411. <Bug pattern="ME_ENUM_FIELD_SETTER"/>
  412. </Match>
  413. <!-- Experimental interface. Ignore. -->
  414. <Match>
  415. <Class name="org.apache.hadoop.metrics2.lib.DefaultMetricsFactory"/>
  416. <Method name="setInstance"/>
  417. <Bug pattern="ME_ENUM_FIELD_SETTER"/>
  418. </Match>
  419. <!-- findbugs is complaining that a stream isn't closed. It will be. -->
  420. <Match>
  421. <Class name="org.apache.hadoop.util.JsonSerialization"/>
  422. <Method name="save"/>
  423. <Bug pattern="OBL_UNSATISFIED_OBLIGATION"/>
  424. </Match>
  425. <Match>
  426. <Class name="org.apache.hadoop.ipc.ProtobufHelper" />
  427. <Method name="getFixedByteString" />
  428. <Bug pattern="AT_OPERATION_SEQUENCE_ON_CONCURRENT_ABSTRACTION" />
  429. </Match>
  430. </FindBugsFilter>