Skip to content

Commit 156653e

Browse files
IO-442: Javadoc contradictory for FileFilterUtils.ageFileFilter(cutoff) and the filter it constructs: AgeFileFilter(cutoff)
correct FileFilterUtils.ageFileFilter(cutoff) javadoc
1 parent 872c744 commit 156653e

2 files changed

Lines changed: 9 additions & 6 deletions

File tree

src/changes/changes.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ The <action> type attribute can be add,update,fix,remove.
4747
<body>
4848
<!-- The release date is the date RC is cut -->
4949
<release version="2.6" date="2017-MM-DD" description="New features and bug fixes.">
50+
<action issue="IO-442" dev="pschumacher" type="fix" due-to="Simon Robinson">
51+
Javadoc contradictory for FileFilterUtils.ageFileFilter(cutoff) and the filter it constructs: AgeFileFilter(cutoff)
52+
</action>
5053
<action issue="IO-534" dev="sebb" type="fix">
5154
FileUtilTestCase.testForceDeleteDir() should not delete testDirectory parent
5255
</action>

src/main/java/org/apache/commons/io/filefilter/FileFilterUtils.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -518,8 +518,8 @@ public static IOFileFilter asFileFilter(final FilenameFilter filter) {
518518

519519
//-----------------------------------------------------------------------
520520
/**
521-
* Returns a filter that returns true if the file was last modified after
522-
* the specified cutoff time.
521+
* Returns a filter that returns true if the file was last modified before
522+
* or at the specified cutoff time.
523523
*
524524
* @param cutoff the time threshold
525525
* @return an appropriately configured age file filter
@@ -544,8 +544,8 @@ public static IOFileFilter ageFileFilter(final long cutoff, final boolean accept
544544
}
545545

546546
/**
547-
* Returns a filter that returns true if the file was last modified after
548-
* the specified cutoff date.
547+
* Returns a filter that returns true if the file was last modified before
548+
* or at the specified cutoff date.
549549
*
550550
* @param cutoffDate the time threshold
551551
* @return an appropriately configured age file filter
@@ -570,8 +570,8 @@ public static IOFileFilter ageFileFilter(final Date cutoffDate, final boolean ac
570570
}
571571

572572
/**
573-
* Returns a filter that returns true if the file was last modified after
574-
* the specified reference file.
573+
* Returns a filter that returns true if the file was last modified before
574+
* or at the same time as the specified reference file.
575575
*
576576
* @param cutoffReference the file whose last modification
577577
* time is used as the threshold age of the files

0 commit comments

Comments
 (0)