findbugsExcludeFile.xml 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273
  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. <Bug pattern="EI_EXPOSE_REP" />
  21. </Match>
  22. <Match>
  23. <Bug pattern="EI_EXPOSE_REP2" />
  24. </Match>
  25. <Match>
  26. <Bug pattern="SE_COMPARATOR_SHOULD_BE_SERIALIZABLE" />
  27. </Match>
  28. <Match>
  29. <Class name="~.*_jsp" />
  30. <Bug pattern="DLS_DEAD_LOCAL_STORE" />
  31. </Match>
  32. <Match>
  33. <Field name="_jspx_dependants" />
  34. <Bug pattern="UWF_UNWRITTEN_FIELD" />
  35. </Match>
  36. <!--
  37. Inconsistent synchronization for Client.Connection.out is
  38. is intentional to make a connection to be closed instantly.
  39. -->
  40. <Match>
  41. <Class name="org.apache.hadoop.ipc.Client$Connection" />
  42. <Field name="out" />
  43. <Bug pattern="IS2_INCONSISTENT_SYNC" />
  44. </Match>
  45. <!--
  46. Further SaslException should be ignored during cleanup and
  47. original exception should be re-thrown.
  48. -->
  49. <Match>
  50. <Class name="org.apache.hadoop.security.SaslRpcClient" />
  51. <Bug pattern="DE_MIGHT_IGNORE" />
  52. </Match>
  53. <!--
  54. Ignore Cross Scripting Vulnerabilities
  55. -->
  56. <Match>
  57. <Package name="~org.apache.hadoop.mapred.*" />
  58. <Bug code="XSS" />
  59. </Match>
  60. <Match>
  61. <Class name="org.apache.hadoop.mapred.taskdetails_jsp" />
  62. <Bug code="HRS" />
  63. </Match>
  64. <!--
  65. Ignore warnings where child class has the same name as
  66. super class. Classes based on Old API shadow names from
  67. new API. Should go off after HADOOP-1.0
  68. -->
  69. <Match>
  70. <Class name="~org.apache.hadoop.mapred.*" />
  71. <Bug pattern="NM_SAME_SIMPLE_NAME_AS_SUPERCLASS" />
  72. </Match>
  73. <!--
  74. Ignore warnings for usage of System.exit. This is
  75. required and have been well thought out
  76. -->
  77. <Match>
  78. <Class name="org.apache.hadoop.mapred.Child$2" />
  79. <Method name="run" />
  80. <Bug pattern="DM_EXIT" />
  81. </Match>
  82. <Match>
  83. <Class name="org.apache.hadoop.mapred.JobTracker" />
  84. <Method name="addHostToNodeMapping" />
  85. <Bug pattern="DM_EXIT" />
  86. </Match>
  87. <Match>
  88. <Class name="org.apache.hadoop.mapred.Task" />
  89. <Or>
  90. <Method name="done" />
  91. <Method name="commit" />
  92. <Method name="statusUpdate" />
  93. </Or>
  94. <Bug pattern="DM_EXIT" />
  95. </Match>
  96. <Match>
  97. <Class name="org.apache.hadoop.mapred.Task$TaskReporter" />
  98. <Method name="run" />
  99. <Bug pattern="DM_EXIT" />
  100. </Match>
  101. <!--
  102. We need to cast objects between old and new api objects
  103. -->
  104. <Match>
  105. <Class name="org.apache.hadoop.mapred.OutputCommitter" />
  106. <Bug pattern="BC_UNCONFIRMED_CAST" />
  107. </Match>
  108. <!--
  109. We intentionally do the get name from the inner class
  110. -->
  111. <Match>
  112. <Class name="org.apache.hadoop.mapred.TaskTracker$MapEventsFetcherThread" />
  113. <Method name="run" />
  114. <Bug pattern="IA_AMBIGUOUS_INVOCATION_OF_INHERITED_OR_OUTER_METHOD" />
  115. </Match>
  116. <Match>
  117. <Class name="org.apache.hadoop.mapred.FileOutputCommitter" />
  118. <Bug pattern="NM_WRONG_PACKAGE_INTENTIONAL" />
  119. </Match>
  120. <!--
  121. Ignoring this warning as resolving this would need a non-trivial change in code
  122. -->
  123. <Match>
  124. <Class name="org.apache.hadoop.mapred.lib.aggregate.ValueAggregatorBaseDescriptor" />
  125. <Method name="configure" />
  126. <Field name="maxNumItems" />
  127. <Bug pattern="ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD" />
  128. </Match>
  129. <!--
  130. Comes from org.apache.jasper.runtime.ResourceInjector. Cannot do much.
  131. -->
  132. <Match>
  133. <Class name="org.apache.hadoop.mapred.jobqueue_005fdetails_jsp" />
  134. <Field name="_jspx_resourceInjector" />
  135. <Bug pattern="SE_BAD_FIELD" />
  136. </Match>
  137. <!--
  138. Storing textInputFormat and then passing it as a parameter. Safe to ignore.
  139. -->
  140. <Match>
  141. <Class name="org.apache.hadoop.mapred.lib.aggregate.ValueAggregatorJob" />
  142. <Method name="createValueAggregatorJob" />
  143. <Bug pattern="DLS_DEAD_STORE_OF_CLASS_LITERAL" />
  144. </Match>
  145. <!--
  146. Can remove this after the upgrade to findbugs1.3.8
  147. -->
  148. <Match>
  149. <Class name="org.apache.hadoop.mapred.lib.db.DBInputFormat" />
  150. <Method name="getSplits" />
  151. <Bug pattern="DLS_DEAD_LOCAL_STORE" />
  152. </Match>
  153. <!--
  154. This is a spurious warning. Just ignore
  155. -->
  156. <Match>
  157. <Class name="org.apache.hadoop.mapred.MapTask$MapOutputBuffer" />
  158. <Field name="kvindex" />
  159. <Bug pattern="IS2_INCONSISTENT_SYNC" />
  160. </Match>
  161. <!--
  162. core changes
  163. -->
  164. <Match>
  165. <Class name="~org.apache.hadoop.*" />
  166. <Bug code="MS" />
  167. </Match>
  168. <Match>
  169. <Class name="org.apache.hadoop.fs.FileSystem" />
  170. <Method name="checkPath" />
  171. <Bug pattern="ES_COMPARING_STRINGS_WITH_EQ" />
  172. </Match>
  173. <Match>
  174. <Class name="org.apache.hadoop.fs.kfs.KFSOutputStream" />
  175. <Field name="path" />
  176. <Bug pattern="URF_UNREAD_FIELD" />
  177. </Match>
  178. <Match>
  179. <Class name="org.apache.hadoop.fs.kfs.KosmosFileSystem" />
  180. <Method name="initialize" />
  181. <Bug pattern="DM_EXIT" />
  182. </Match>
  183. <Match>
  184. <Class name="org.apache.hadoop.io.Closeable" />
  185. <Bug pattern="NM_SAME_SIMPLE_NAME_AS_INTERFACE" />
  186. </Match>
  187. <Match>
  188. <Class name="org.apache.hadoop.security.AccessControlException" />
  189. <Bug pattern="NM_SAME_SIMPLE_NAME_AS_SUPERCLASS" />
  190. </Match>
  191. <Match>
  192. <Class name="org.apache.hadoop.record.meta.Utils" />
  193. <Method name="skip" />
  194. <Bug pattern="BC_UNCONFIRMED_CAST" />
  195. </Match>
  196. <!--
  197. The compareTo method is actually a dummy method that just
  198. throws excpetions. So, no need to override equals. Ignore
  199. -->
  200. <Match>
  201. <Class name="org.apache.hadoop.record.meta.RecordTypeInfo" />
  202. <Bug pattern="EQ_COMPARETO_USE_OBJECT_EQUALS" />
  203. </Match>
  204. <Match>
  205. <Class name="org.apache.hadoop.util.ProcfsBasedProcessTree" />
  206. <Bug pattern="DMI_HARDCODED_ABSOLUTE_FILENAME" />
  207. </Match>
  208. <!--
  209. Streaming, Examples
  210. -->
  211. <Match>
  212. <Class name="org.apache.hadoop.streaming.StreamUtil$TaskId" />
  213. <Bug pattern="URF_UNREAD_FIELD" />
  214. </Match>
  215. <Match>
  216. <Class name="org.apache.hadoop.examples.DBCountPageView" />
  217. <Method name="verify" />
  218. <Bug pattern="OBL_UNSATISFIED_OBLIGATION" />
  219. </Match>
  220. <Match>
  221. <Class name="org.apache.hadoop.examples.ContextFactory" />
  222. <Method name="setAttributes" />
  223. <Bug pattern="OBL_UNSATISFIED_OBLIGATION" />
  224. </Match>
  225. <!--
  226. TFile
  227. -->
  228. <Match>
  229. <Class name="org.apache.hadoop.io.file.tfile.Chunk$ChunkDecoder" />
  230. <Method name="close" />
  231. <Bug pattern="SR_NOT_CHECKED" />
  232. </Match>
  233. <!--
  234. The purpose of skip() is to drain remaining bytes of the chunk-encoded
  235. stream (one chunk at a time). The termination condition is checked by
  236. checkEOF().
  237. -->
  238. <Match>
  239. <Class name="org.apache.hadoop.io.file.tfile.Utils" />
  240. <Method name="writeVLong" />
  241. <Bug pattern="SF_SWITCH_FALLTHROUGH" />
  242. </Match>
  243. <!--
  244. The switch condition fall through is intentional and for performance
  245. purposes.
  246. -->
  247. <Match>
  248. <Class name="org.apache.hadoop.log.EventCounter"/>
  249. <!-- backward compatibility -->
  250. <Bug pattern="NM_SAME_SIMPLE_NAME_AS_SUPERCLASS"/>
  251. </Match>
  252. <Match>
  253. <Class name="org.apache.hadoop.metrics.jvm.EventCounter"/>
  254. <!-- backward compatibility -->
  255. <Bug pattern="NM_SAME_SIMPLE_NAME_AS_SUPERCLASS"/>
  256. </Match>
  257. </FindBugsFilter>