thecoop opened a new pull request, #14633:
URL: https://github.com/apache/lucene/pull/14633

   The use of a boolean `success` parameter is common in the Lucene codebase. 
This can be replaced with a `catch (Throwable t) {...; throw t}` pattern that 
means a boolean doesn't need to be used at all, and it generally results in 
less code. This is helped by some new methods on `IOUtils`.
   
   As a side-effect, any problems that occur whilst closing/deleting during 
exception handling will now be added to the top-level rethrown exception, 
rather than being swallowed and disappearing.
   
   I've converted a few here to show the pattern - if this is a direction we 
want to go in, I can convert more.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to