Simon Willnauer created LUCENE-6051:
---------------------------------------

             Summary: IOUtils methods taking Iterable<? extends Path> try to 
delete every element of the path
                 Key: LUCENE-6051
                 URL: https://issues.apache.org/jira/browse/LUCENE-6051
             Project: Lucene - Core
          Issue Type: Bug
          Components: core/other
            Reporter: Simon Willnauer
            Priority: Blocker
             Fix For: 5.0, Trunk


We have two methods in IOUtils
{code}
public static void deleteFilesIgnoringExceptions(Iterable<? extends Path> 
files);

 public static void deleteFilesIfExist(Iterable<? extends Path> files) throws 
IOException
{code}

if you call these with a single Path instance it interprets it as 
Iterable<Path> since Path implements Iternable<Path> and in-turn tries to 
delete every element of the path. I guess we should fix this before we release. 
We also need to check if there are other places where we do this... it's 
nasty... 




--
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