[ 
https://issues.apache.org/jira/browse/LUCENE-8215?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16405323#comment-16405323
 ] 

Dawid Weiss commented on LUCENE-8215:
-------------------------------------

I like it, although I'm not sure if IOUtils.close(...) is the right method 
name. I had to look at it a few times to understand what it does... it's not 
really "closing" anything, it just applies the consumer predicate to all 
arguments, suppressing any exceptions except the first one... Wouldn't it be 
better to call it something like "applyToAll" (other name suggestions welcome) 
and provide a better explanation of how exceptions are handled in the javadoc?

Not a blocker at all, but I think it'd make it easier to understand (since 
IOConsumer is not even closeable).

>  Fix several fragile exception handling places in o.a.l.index
> -------------------------------------------------------------
>
>                 Key: LUCENE-8215
>                 URL: https://issues.apache.org/jira/browse/LUCENE-8215
>             Project: Lucene - Core
>          Issue Type: Improvement
>    Affects Versions: 7.4, master (8.0)
>            Reporter: Simon Willnauer
>            Priority: Major
>             Fix For: 7.4, master (8.0)
>
>         Attachments: LUCENE-8215.patch, LUCENE-8215.patch
>
>
> Several places in the index package don't handle exceptions well or ignores 
> them. This change adds some utility methods and cuts over to make use of 
> try/with blocks to simplify exception handling.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to