[ 
https://issues.apache.org/jira/browse/IO-442?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Pascal Schumacher resolved IO-442.
----------------------------------
       Resolution: Fixed
         Assignee: Pascal Schumacher
    Fix Version/s: 2.6

The javadoc of AgeFileFilter is correct. I have just fixed the FileFilterUtils 
javadoc. Thanks for reporting!

> Javadoc contradictory for FileFilterUtils.ageFileFilter(cutoff) and the 
> filter it constructs: AgeFileFilter(cutoff)
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: IO-442
>                 URL: https://issues.apache.org/jira/browse/IO-442
>             Project: Commons IO
>          Issue Type: Bug
>          Components: Filters
>    Affects Versions: 2.4
>            Reporter: Simon Robinson
>            Assignee: Pascal Schumacher
>            Priority: Trivial
>             Fix For: 2.6
>
>
> Documentation states that it returns true if the file is *after* cutoff... 
> but the code does opposite!
> {code}
>     /**
>      * Returns a filter that returns true if the file was last modified after
>      * the specified cutoff time.
>      */
> {code}
> BUT..the code constructs the following:
> {code}
>     public static IOFileFilter ageFileFilter(long cutoff) {
>         return new AgeFileFilter(cutoff);
>     }
> {code}
> And the Javadoc for this AgeFileFilter says...OLDER i.e. before
> {code}
>     /**
>      * Constructs a new age file filter for files equal to or older than
>      * a certain cutoff
>      *
>      * @param cutoff  the threshold age of the files
>      */
> {code}
> Which is it?!



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to