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

Kevin Risden commented on SOLR-8190:
------------------------------------

The getTuples method was added recently which is the only place that open/close 
is called. This is where the try w/ resources should go instead of wrapping 
each test. I'll update the patch with changes. This should make the patch a lot 
simpler. While investigating this I found that there are now two new NPE issues 
w/ FacetStream and StatsStream with the same type cause as in SOLR-8191. 

> Implement Closeable on TupleStream
> ----------------------------------
>
>                 Key: SOLR-8190
>                 URL: https://issues.apache.org/jira/browse/SOLR-8190
>             Project: Solr
>          Issue Type: Bug
>          Components: SolrJ
>    Affects Versions: Trunk
>            Reporter: Kevin Risden
>            Assignee: Joel Bernstein
>            Priority: Minor
>         Attachments: SOLR-8190.patch, SOLR-8190.patch
>
>
> Implementing Closeable on TupleStream provides the ability to use 
> try-with-resources 
> (https://docs.oracle.com/javase/tutorial/essential/exceptions/tryResourceClose.html)
>  in tests and in practice. This prevents TupleStreams from being left open 
> when there is an error in the tests.



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

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

Reply via email to