[ https://issues.apache.org/jira/browse/IO-442?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Simon Robinson updated IO-442: ------------------------------ Description: 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} was: 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} > 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 > Priority: Trivial > > 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} -- This message was sent by Atlassian JIRA (v6.2#6252)