You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

findbugs-exclude.xml 9.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FindBugsFilter>
  3. <!--
  4. !
  5. ! This file is divided into two parts:
  6. ! 1. APPROVED EXCLUSIONS
  7. ! 2. TEMPORARY (UNAPPROVED) EXCLUSIONS
  8. !
  9. ! Approved exclusions come in two sub-types:
  10. ! 1. general exclusion of a named bug pattern, meaning that all instances that matches the bug
  11. ! pattern identifier are excluded;
  12. ! 2. specific exclusions for a named bug pattern, meaning that all instance exclusions are
  13. ! explicitly enumerated;
  14. !
  15. ! All specific exclusions must be accompanied inline (i.e., in the affected source code) by
  16. ! a commented out annotation of the form:
  17. !
  18. ! // @SuppressFBWarnings("pattern identifier")
  19. !
  20. ! where pattern identifier is one of findbugs' named patterns. At an appropriate point in the
  21. ! future, these commented out annotations will be uncommented and exclusion patterns removed
  22. ! from this file.
  23. !
  24. ! Temporary (unapproved) exclusions are short-term work arounds that should be removed as
  25. ! soon as possible by either (1) fixing (eliminating) cause of warning, or (2) conversion to
  26. ! approved exclusion.
  27. !
  28. ! The organization of pattern matches employs the following levels (from top down):
  29. ! 1. bug pattern
  30. ! 2. or clause matching instances
  31. ! 3. class name, if applies to class/interface
  32. ! 4. and clause matching class/instance and single or or clause of multiple {method,field} members
  33. !
  34. ! for example,
  35. !
  36. ! <Match>
  37. ! <Bug pattern="pattern identifier"/>
  38. ! <Or>
  39. ! <And>
  40. ! <Class name="dotted class name"/>
  41. ! <Member name="unqualified member name"/>
  42. ! </And>
  43. ! </Or>
  44. ! </Match>
  45. !
  46. -->
  47. <!-- START - APPROVED EXCLUSIONS -->
  48. <Match>
  49. <Bug pattern="BC_BAD_CAST_TO_CONCRETE_COLLECTION"/>
  50. <!-- TODO - Not sure what to do with those two... Seems messy/hacky -->
  51. <And>
  52. <Class name="org.apache.fop.area.AreaTreeObject"/>
  53. <Method name="clone"/>
  54. </And>
  55. </Match>
  56. <Match>
  57. <Bug pattern="BC_UNCONFIRMED_CAST_OF_RETURN_VALUE"/>
  58. <!-- TODO - See if these can be solved in a better way -->
  59. <Or>
  60. <And>
  61. <Class name="org.apache.fop.layoutmgr.PageBreakingAlgorithm"/>
  62. <Or>
  63. <Method name="createFootnotePages"/>
  64. <Method name="finish"/>
  65. </Or>
  66. </And>
  67. <And>
  68. <Class name="org.apache.fop.render.rtf.RTFHandler"/>
  69. <Or>
  70. <Method name="endCell"/>
  71. <Method name="endFootnoteBody"/>
  72. <Method name="endPart"/>
  73. <Method name="endRow"/>
  74. <Method name="startCell"/>
  75. <Method name="startFootnoteBody"/>
  76. <Method name="startListItem"/>
  77. <Method name="startListLabel"/>
  78. <Method name="startPart"/>
  79. <Method name="startRow"/>
  80. </Or>
  81. </And>
  82. </Or>
  83. </Match>
  84. <Match>
  85. <Bug pattern="CN_IDIOM_NO_SUPER_CALL"/>
  86. <Or>
  87. <And>
  88. <Class name="org.apache.fop.render.intermediate.IFGraphicContext"/>
  89. <Method name="clone"/>
  90. </And>
  91. <And>
  92. <Class name="org.apache.fop.svg.text.BidiAttributedCharacterIterator"/>
  93. <Method name="clone"/>
  94. </And>
  95. </Or>
  96. </Match>
  97. <Match>
  98. <Bug pattern="DM_EXIT"/>
  99. <Or>
  100. <And>
  101. <Class name="org.apache.fop.cli.CommandLineOptions"/>
  102. <Or>
  103. <Method name="parseCustomOutputOption"/>
  104. <Method name="parseOptions"/>
  105. </Or>
  106. </And>
  107. <And>
  108. <Class name="org.apache.fop.cli.Main"/>
  109. <Or>
  110. <Method name="startFOP"/>
  111. <Method name="startFOPWithDynamicClasspath"/>
  112. </Or>
  113. </And>
  114. <And>
  115. <Class name="org.apache.fop.tools.fontlist.FontListMain"/>
  116. <Or>
  117. <Method name="parseArguments"/>
  118. </Or>
  119. </And>
  120. </Or>
  121. </Match>
  122. <Match>
  123. <!-- Only OK as long as the type of the base map remains plain HashMap... -->
  124. <Bug pattern="DMI_ENTRY_SETS_MAY_REUSE_ENTRY_OBJECTS"/>
  125. <And>
  126. <Class name="org.apache.fop.fonts.truetype.OpenFont"/>
  127. <Method name="sortDirTabMap"/>
  128. </And>
  129. </Match>
  130. <Match>
  131. <Bug pattern="EQ_ALWAYS_TRUE"/>
  132. <Or>
  133. <And>
  134. <Class name="org.apache.fop.fo.properties.ToBeImplementedProperty"/>
  135. <Method name="equals"/>
  136. </And>
  137. </Or>
  138. </Match>
  139. <Match>
  140. <Bug pattern="MS_EXPOSE_REP"/>
  141. <Or>
  142. <And>
  143. <Class name="org.apache.fop.fo.FOPropertyMapping"/>
  144. <Method name="getGenericMappings"/>
  145. </And>
  146. </Or>
  147. </Match>
  148. <Match>
  149. <Bug pattern="NM_SAME_SIMPLE_NAME_AS_INTERFACE"/>
  150. <Or>
  151. <Class name="org.apache.fop.apps.MimeConstants"/>
  152. <Class name="org.apache.fop.events.EventListener"/>
  153. <Class name="org.apache.fop.render.Graphics2DImagePainter"/>
  154. </Or>
  155. </Match>
  156. <Match>
  157. <Bug pattern="NM_SAME_SIMPLE_NAME_AS_SUPERCLASS"/>
  158. <Or>
  159. <Class name="org.apache.fop.render.ps.PSFontUtils"/>
  160. <Class name="org.apache.fop.render.ps.PSImageUtils"/>
  161. <Class name="org.apache.fop.svg.GraphicsConfiguration"/>
  162. <Class name="org.apache.fop.svg.PDFTextUtil"/>
  163. <Class name="org.apache.fop.util.QName"/>
  164. </Or>
  165. </Match>
  166. <Match>
  167. <Bug pattern="OS_OPEN_STREAM_EXCEPTION_PATH"/>
  168. <!-- TODO - fix potential file descriptor leak -->
  169. <And>
  170. <Class name="org.apache.fop.hyphenation.SerializeHyphPattern"/>
  171. <Method name="serializeFile"/>
  172. </And>
  173. </Match>
  174. <Match>
  175. <Bug pattern="SE_INNER_CLASS"/>
  176. <Or>
  177. <Class name="org.apache.fop.afp.AFPPaintingState$AFPData"/>
  178. <Class name="org.apache.fop.area.inline.AbstractTextArea$TextAdjustingInfo"/>
  179. <Class name="org.apache.fop.area.inline.InlineArea$InlineAdjustingInfo"/>
  180. <Class name="org.apache.fop.area.LineArea$LineAdjustingInfo"/>
  181. <Class name="org.apache.fop.pdf.PDFPaintingState$PDFData"/>
  182. <Class name="org.apache.fop.util.AbstractPaintingState$StateStack"/>
  183. </Or>
  184. </Match>
  185. <Match>
  186. <Bug pattern="SF_SWITCH_FALLTHROUGH"/>
  187. <Or>
  188. <And>
  189. <Class name="org.apache.fop.render.awt.viewer.PreviewPanel$Reloader"/>
  190. <Method name="run"/>
  191. </And>
  192. </Or>
  193. </Match>
  194. <Match>
  195. <Bug pattern="ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD"/>
  196. <Or>
  197. <!-- TODO - fix later -->
  198. <Class name="org.apache.fop.render.rtf.rtflib.rtfdoc.RtfElement"/>
  199. <!-- FOs not yet implemented -->
  200. <Class name="org.apache.fop.fo.flow.MultiProperties"/>
  201. <Class name="org.apache.fop.fo.flow.MultiPropertySet"/>
  202. <Class name="org.apache.fop.fo.flow.MultiToggle"/>
  203. <Class name="org.apache.fop.fo.flow.table.TableAndCaption"/>
  204. <Class name="org.apache.fop.fo.flow.table.TableCaption"/>
  205. </Or>
  206. </Match>
  207. <Match>
  208. <Bug pattern="URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD"/>
  209. <Or>
  210. <!-- TODO - Implementation incomplete?
  211. If not, remove unused field(s) and unused accessors -->
  212. <Class name="org.apache.fop.complexscripts.fonts.GlyphProcessingState"/>
  213. <Class name="org.apache.fop.layoutmgr.inline.InlineStackingLayoutManager"/>
  214. <Class name="org.apache.fop.pdf.PDFCMap"/>
  215. <Class name="org.apache.fop.render.pdf.PDFSVGHandler$PDFInfo"/>
  216. <Class name="org.apache.fop.svg.PDFGraphics2D"/>
  217. <!-- Properties not yet implemented -->
  218. <Class name="org.apache.fop.fo.flow.MultiToggle"/>
  219. <Class name="org.apache.fop.fo.properties.CommonMarginInline"/>
  220. <Class name="org.apache.fop.fo.properties.CommonRelativePosition"/>
  221. </Or>
  222. </Match>
  223. <Match>
  224. <Bug pattern="UUF_UNUSED_PUBLIC_OR_PROTECTED_FIELD"/>
  225. <!-- Properties not yet implemented -->
  226. <Class name="org.apache.fop.fo.properties.CommonAural"/>
  227. </Match>
  228. <!-- END - APPROVED EXCLUSIONS -->
  229. <!-- START - TEMPORARY (UNAPPROVED) EXCLUSIONS -->
  230. <Match>
  231. <!-- 131 warnings -->
  232. <Bug pattern="BC_UNCONFIRMED_CAST"/>
  233. </Match>
  234. <Match>
  235. <!-- 15 warnings -->
  236. <Bug pattern="DB_DUPLICATE_SWITCH_CLAUSES"/>
  237. </Match>
  238. <Match>
  239. <!-- 27 warnings -->
  240. <Bug pattern="DLS_DEAD_LOCAL_STORE"/>
  241. </Match>
  242. <Match>
  243. <!-- 29 warnings -->
  244. <Bug pattern="DM_CONVERT_CASE"/>
  245. </Match>
  246. <Match>
  247. <!-- 17 warnings -->
  248. <Bug pattern="DM_DEFAULT_ENCODING"/>
  249. </Match>
  250. <Match>
  251. <!-- 20 warnings -->
  252. <Bug pattern="DM_FP_NUMBER_CTOR"/>
  253. </Match>
  254. <Match>
  255. <!-- 88 warnings -->
  256. <Bug pattern="DM_NUMBER_CTOR"/>
  257. </Match>
  258. <Match>
  259. <!-- 84 warnings -->
  260. <Bug pattern="EI_EXPOSE_REP"/>
  261. </Match>
  262. <Match>
  263. <!-- 55 warnings -->
  264. <Bug pattern="EI_EXPOSE_REP2"/>
  265. </Match>
  266. <Match>
  267. <!-- 12 warnings -->
  268. <Bug pattern="FE_FLOATING_POINT_EQUALITY"/>
  269. </Match>
  270. <Match>
  271. <!-- 12 warnings -->
  272. <Bug pattern="MS_OOI_PKGPROTECT"/>
  273. </Match>
  274. <Match>
  275. <!-- 15 warnings -->
  276. <Bug pattern="MS_PKGPROTECT"/>
  277. </Match>
  278. <Match>
  279. <!-- 11 warnings -->
  280. <Bug pattern="NM_CONFUSING"/>
  281. </Match>
  282. <Match>
  283. <!-- 46 warnings -->
  284. <Bug pattern="PZLA_PREFER_ZERO_LENGTH_ARRAYS"/>
  285. </Match>
  286. <Match>
  287. <!-- 10 warnings -->
  288. <Bug pattern="RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE"/>
  289. </Match>
  290. <Match>
  291. <!-- 23 warnings -->
  292. <Bug pattern="REC_CATCH_EXCEPTION"/>
  293. </Match>
  294. <Match>
  295. <!-- 11 warnings -->
  296. <Bug pattern="RV_RETURN_VALUE_IGNORED_BAD_PRACTICE"/>
  297. </Match>
  298. <Match>
  299. <!-- 33 warnings -->
  300. <Bug pattern="SE_BAD_FIELD"/>
  301. </Match>
  302. <Match>
  303. <!-- 21 warnings -->
  304. <Bug pattern="SIC_INNER_SHOULD_BE_STATIC"/>
  305. </Match>
  306. <Match>
  307. <!-- 20 warnings -->
  308. <Bug pattern="SIC_INNER_SHOULD_BE_STATIC_ANON"/>
  309. </Match>
  310. <Match>
  311. <!-- 12 warnings -->
  312. <Bug pattern="URF_UNREAD_FIELD"/>
  313. </Match>
  314. <Match>
  315. <!-- 58 warnings -->
  316. <Bug pattern="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR"/>
  317. </Match>
  318. <!-- END - TEMPORARY (UNAPPROVED) EXCLUSIONS -->
  319. </FindBugsFilter>