You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Shai Erera (JIRA)" <ji...@apache.org> on 2011/05/22 09:54:47 UTC

[jira] [Created] (LUCENE-3132) Use FileFilter instead of FileNameFilter in FSDirectory.listAll

Use FileFilter instead of FileNameFilter in FSDirectory.listAll
---------------------------------------------------------------

                 Key: LUCENE-3132
                 URL: https://issues.apache.org/jira/browse/LUCENE-3132
             Project: Lucene - Java
          Issue Type: Improvement
            Reporter: Shai Erera
            Assignee: Shai Erera
            Priority: Trivial
             Fix For: 3.2, 4.0


FSDirectory.listAll() uses FileNameFilter, but all it does is check whether the File + name given denotes a directory. For that, it does new File(dir, file).isDirectory(). If we use FileFilter, new File() won't be necessary. This is a trivial thing, I'll post a patch soon.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

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


[jira] [Resolved] (LUCENE-3132) Use FileFilter instead of FileNameFilter in FSDirectory.listAll

Posted by "Shai Erera (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-3132?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Shai Erera resolved LUCENE-3132.
--------------------------------

       Resolution: Invalid
    Fix Version/s:     (was: 3.2)
                       (was: 4.0)
    Lucene Fields: [New]  (was: [Patch Available, New])

Sorry, hit the 'create' button instead getting out the "Issue create process". FilenameFilter is required because we return the file names (we call File.list() and not File.listFiles()).

> Use FileFilter instead of FileNameFilter in FSDirectory.listAll
> ---------------------------------------------------------------
>
>                 Key: LUCENE-3132
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3132
>             Project: Lucene - Java
>          Issue Type: Improvement
>            Reporter: Shai Erera
>            Assignee: Shai Erera
>            Priority: Trivial
>
> FSDirectory.listAll() uses FileNameFilter, but all it does is check whether the File + name given denotes a directory. For that, it does new File(dir, file).isDirectory(). If we use FileFilter, new File() won't be necessary. This is a trivial thing, I'll post a patch soon.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

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