Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-10090

Helper methods for safe cleanup

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Low
    • Resolution: Duplicate
    • None
    • None
    • None
    • Low

    Description

      It's very easy to introduce a bug during cleanup/close methods of a class, and having just encountered another instance of this I think it's worthwhile introducing some utilities to make this easier to get right. Lambdas make it easy to neatly define the discrete cleanup actions that need to happen, and a simple static helper method can ensure these are all executed, with any resulting exceptions being aggregated and thrown together. This should also make such code much more legible, as an added bonus.

      Attachments

        Issue Links

          Activity

            People

              benedict Benedict Elliott Smith
              benedict Benedict Elliott Smith
              Benedict Elliott Smith
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: