Issue Details (XML | Word | Printable)

Key: SANDBOX-154
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Unassigned
Reporter: Martin Kompf
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Commons Sandbox

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

Created: 25/Apr/05 09:57 PM   Updated: 05/Jan/08 07:15 PM
Return to search
Component/s: Finder
Affects Version/s: None
Fix Version/s: None

Time Tracking:
Not Specified

Environment:
Operating System: Windows 2000
Platform: All

Bugzilla Id: 34601


 Description  « Hide
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'



 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
There are no subversion log entries for this issue yet.