You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Simon Willnauer (JIRA)" <ji...@apache.org> on 2014/11/06 17:44:33 UTC
[jira] [Updated] (LUCENE-6051) IOUtils methods taking Iterable
extends Path> try to delete every element of the path
[ https://issues.apache.org/jira/browse/LUCENE-6051?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Simon Willnauer updated LUCENE-6051:
------------------------------------
Description:
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...
was:
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...
> 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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org