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

Alan Woodward commented on LUCENE-6916:
---------------------------------------

It's FileSystem leaks rather than file leaks for me, but it's a fairly unusual 
case I know.

It doesn't seem harder to read to me, but I guess that's subjective anyway :-)  
I can always just copy the test into my own project and make the changes there 
if it makes things more difficult for everybody else.

> BaseDirectoryTestCase should use try-with-resources for its Directories
> -----------------------------------------------------------------------
>
>                 Key: LUCENE-6916
>                 URL: https://issues.apache.org/jira/browse/LUCENE-6916
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Alan Woodward
>            Assignee: Alan Woodward
>            Priority: Minor
>         Attachments: LUCENE-6916.patch
>
>
> I'm playing around with writing a nio2 FileSystem implementation for HDFS 
> that will work with Directory, and it currently leaks threads everywhere 
> because if a BaseDirectoryTestCase test fails it doesn't close its Directory. 
>  This obviously won't be a problem if everything passes, but it will probably 
> be a while before that's true and it makes iterative development a bit of a 
> pain.



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

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

Reply via email to