commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Niall Pemberton (JIRA)" <>
Subject [jira] Resolved: (IO-229) FileFilterUtils - add varargs methods for AndFileFilter and OrFileFilter
Date Tue, 28 Sep 2010 22:57:32 GMT


Niall Pemberton resolved IO-229.

      Assignee: Niall Pemberton
    Resolution: Fixed

Thanks for the patch, but I implemented this as new and(IOFileFilter...) and or(IOFileFilter...)
 methods in FileFilterUtils and deprecated the andFileFilter(IOFileFilter, IOFileFilter) and
orFileFilter(IOFileFilter, IOFileFilter) methods

> FileFilterUtils - add varargs methods for AndFileFilter and OrFileFilter
> ------------------------------------------------------------------------
>                 Key: IO-229
>                 URL:
>             Project: Commons IO
>          Issue Type: Improvement
>          Components: Filters
>    Affects Versions: 1.4
>         Environment: Java 1.5+
>            Reporter: Michael Wooten
>            Assignee: Niall Pemberton
>            Priority: Minor
>             Fix For: 2.0
>         Attachments: varargs-and-or-filters.patch
>   Original Estimate: 2h
>  Remaining Estimate: 2h
> I suggest converting the AndFileFilter(IOFileFilter filter1, IOFileFilter filter2) and
OrFileFilter(IOFileFilter filter1, IOFileFilter filter2) constructors to use varargs and instead
have the signatures AndFileFilter(IOFileFilter... filters) and OrFileFilter(IOFileFilter...
filters). The benefit is that new And/OrFileFilters could be created without having to create
a list or limit the initial number of filters to two.
> Ex: 
> IOFileFilter hiddenNonEmptyTextFileFilter = new AndFileFilter(HiddenFileFilter.HIDDEN,
EmptyFileFilter.NOT_EMPTY, new SuffixFileFilter(".txt"));
> If backwards compatibility is an issue, then the varargs constructors could be added
alongside the two argument constructors.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message