Benedict created CASSANDRA-10090:
------------------------------------

             Summary: Helper methods for safe cleanup
                 Key: CASSANDRA-10090
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-10090
             Project: Cassandra
          Issue Type: Bug
          Components: Core
            Reporter: Benedict
            Assignee: Benedict
            Priority: Minor
             Fix For: 3.x


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.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to