Uploaded image for project: 'Commons Sandbox'
  1. Commons Sandbox
  2. SANDBOX-154

[io] FileFinder.find() doesn't work correctly with Finder.TIME option

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Finder
    • Labels:
      None
    • Environment:

      Operating System: Windows 2000
      Platform: All

    • Bugzilla Id:
      34601

      Description

      FileFinder.find(File file, Map option) doesn't work correctly if options
      contains a Finder.TIME with a value greater than 24.

      The error is in FindingFilter.TimeFilter.accept(File file):

      In the expression

      file.lastModified() > System.currentTimeMillis() - this.argument * 60000*60*24

      the part 'this.argument * 60000*60*24' is evaluated in the integer value range
      which is exhausted if this.argument > 24

      Fix: use 'this.argument * 60000L * 60L * 24L'

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              mkompf@gmx.net Martin Kompf
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: