findbugsExcludeFile.xml 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <FindBugsFilter>
  2. <!-- Allow command line utilities, which follow pattern *Main.java, to call
  3. system exit -->
  4. <Match>
  5. <Class name="~org\.apache\.zookeeper\..*Main" />
  6. <Bug pattern="DM_EXIT" />
  7. </Match>
  8. <!-- This is too complicated to resolve/ingrained into the architecture
  9. In particular we want to make sure we exit if this occurs
  10. Also notice logged as fatal error -->
  11. <Match>
  12. <Class name="org.apache.zookeeper.server.SyncRequestProcessor" />
  13. <Method name="run" />
  14. <Bug pattern="DM_EXIT" />
  15. </Match>
  16. <!-- In particular we want to make sure we exit if this occurs, unrecoverable.
  17. Also notice logged as fatal error -->
  18. <Match>
  19. <Class name="org.apache.zookeeper.server.ZooKeeperServer" />
  20. <Method name="takeSnapshot" />
  21. <Bug pattern="DM_EXIT" />
  22. </Match>
  23. <!-- We want to catch all exceptions and cleanup, regardless of source
  24. (incl runtime) -->
  25. <Match>
  26. <Class name="org.apache.zookeeper.ClientCnxn$SendThread" />
  27. <Method name="run" />
  28. <Bug pattern="REC_CATCH_EXCEPTION" />
  29. </Match>
  30. <!-- If we cannot open a socket to elect a leader, then we should
  31. simply exit -->
  32. <Match>
  33. <Class name="org.apache.zookeeper.server.quorum.LeaderElection" />
  34. <Method name="lookForLeader" />
  35. <Bug pattern="DM_EXIT" />
  36. </Match>
  37. <!-- Committing out of order is an unrecoverable error, so we should
  38. really exit -->
  39. <Match>
  40. <Class name="org.apache.zookeeper.server.quorum.FollowerZooKeeperServer" />
  41. <Method name="commit" />
  42. <Bug pattern="DM_EXIT" />
  43. </Match>
  44. <!-- Two unrecoverable errors while following the leader -->
  45. <Match>
  46. <Class name="org.apache.zookeeper.server.quorum.Follower" />
  47. <Method name="followLeader" />
  48. <Bug pattern="DM_EXIT" />
  49. </Match>
  50. <Match>
  51. <Package name="org.apache.jute.compiler.generated" />
  52. </Match>
  53. <Match>
  54. <Package name="~org\.apache\.zookeeper\.(proto|data|txn)" />
  55. <Bug code="EI, EI2" />
  56. </Match>
  57. </FindBugsFilter>