Uploaded image for project: 'Commons IO'
  1. Commons IO
  2. IO-442

Javadoc contradictory for FileFilterUtils.ageFileFilter(cutoff) and the filter it constructs: AgeFileFilter(cutoff)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • 2.4
    • 2.6
    • Filters
    • None

    Description

      Documentation states that it returns true if the file is after cutoff... but the code does opposite!

          /**
           * Returns a filter that returns true if the file was last modified after
           * the specified cutoff time.
           */
      

      BUT..the code constructs the following:

          public static IOFileFilter ageFileFilter(long cutoff) {
              return new AgeFileFilter(cutoff);
          }
      

      And the Javadoc for this AgeFileFilter says...OLDER i.e. before

          /**
           * Constructs a new age file filter for files equal to or older than
           * a certain cutoff
           *
           * @param cutoff  the threshold age of the files
           */
      

      Which is it?!

      Attachments

        Activity

          People

            pascalschumacher Pascal Schumacher
            roninsos Simon Robinson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: